c언어 구조체 성적표만들기 출력부분 알려주세용...
#include <stdafx.h>
#include <stdio.h>
#define MAXINPUTCOUNT 3
struct student{
char name[20];
int korean;
int english;
int math;
int total;
double average;
};
void swap(student *parmfrist, student *parmsecond)
{
student temp;
temp = *parm_frist;
*parmfrist = *parmsecond;
*parm_second = temp;
}
void main()
{
struct student record[MAXINPUTCOUNT];
int i, j;
for(i = 0; i < MAXINPUTCOUNT; i++){
printf("-. 이름을 입력하세요 : ");
scanf("%s", record[i].name);
printf("-. 국어점수 : ");
scanf("%d", &record[i].korean);
printf("-. 영어점수 : ");
scanf("%d", &record[i].english);
printf("-. 수학점수 : ");
scanf("%d", &record[i].math);
record[i].total = (record[i].korean + record[i].english + record[i].math);
record[i].average = record[i].total / 3.0;
printf("\n");
}
만약 입력부분이 이렇다면 출력부분이
┌───┬───┬───┬───┒
│번호 │ 1 │이름 │ │
│───┼───┼───┼───┤
│국어 │ │총점 │ │
│───┼───┼───┼───┤
│수학 │ │평균 │ │
│───┼───┼───┼───┤
│영어 │ │등수 │ │
└───┴───┴───┴───┘
이런식으로 표를 만들고싶은데 알려주세요