프로그래밍 - 성적 정렬 program
페이지 정보
작성일 19-09-18 15:53
본문
Download : 프로그래밍 - 성적 정렬 프로그램.hwp
프로그래밍,성적,정렬,프로그램,공학기술,레포트
프로그래밍 - 성적 정렬 program
프로그래밍 - 성적 정렬 프로그램 , 프로그래밍 - 성적 정렬 프로그램공학기술레포트 , 프로그래밍 성적 정렬 프로그램






순서
학생들의 어학성적을 오름/내림차순으로 정렬하는 호로그램
구조체 배열을 이용하여 3개의 원소를 가지는 구조체를 정의(定義)
#include `stdio.h`
#include “stdafx.h”
struct Student // 학번, 이름, 영어점수 3개원소를 가지는 구조체 정의(定義)
{
int stu_num;
char stu_name[10];
float stu_eng;
};
void Input(struct Student std); // 사용자정의(定義) 함수를 정의(定義)
void Output(struct Student std); // 입력함수 input, 출력함수 output을 사용하기
void up_Sort(struct Student std); 위하여 포인터 std를 이용하여 정의(定義)된 구조체
void down_Sort(struct Student std); struct Student의 멤버를 참조
void main
{
int i;
struct Student student[3]; // 3명의 학생정보를 저장할 수 있는
구조체 배열을 생성
for(i = 0; i ` 3; i++){ // 학생정보를 입력받기 위하여 main문에서
for문을 사용
Input(&student[i]); // 입력함수를 이용하여 데이터 입력
}
int sort;
printf(`1. 영어 점수에 따른 오름차순 정렬 2. 영어 점수에 따른 내림차순 정렬`);
scanf(`%d`, &sort);
switch(sort){ // 점수를 오름차순, 내림차순으로 선택하여 정렬하기 위하여
switc…(투비컨티뉴드 )
프로그래밍 - 성적 정렬 program
설명
Download : 프로그래밍 - 성적 정렬 프로그램.hwp( 60 )
레포트/공학기술
다.