에러난 이유좀 설명해주세요ㅠㅠㅠㅠ
은소라
#includestdio.h
struct sungjuk {
char *name;
int korean;
int english;
int math;
int science;
int sum;
int glade;
};
main()
{
struct sungjuk test[4]={
{김창렬,95,78,85,96}
{리지,96,80,77,88}
{선미,100,88,91,76}
{손동운,84,98,90,86}
};
int i,j;
int count =1 ;
test[i].sum=test[i].name+test[i].korean+test[i].english+test[i].math+test[i].science;
for(i=0; i4; i++,count=1)
{
for(j=0; j4, j++)
{
if(test[i].sum test[j].sum)
count ++;
}
test[i].glade=count;printf(%6s %3d %3d %3d %3d %4d %d \n,
test[i].name, test[i].korea, test[i].english, test[i].math, test[i].science , test[i].sum, test[i].suk );
}
}
-입력된것을 성적순으로 보고싶습니다.
에러가 26개나 되네요ㅠㅠㅠㅠㅠ
알ㄹㅕ주세요ㅠㅠㅠㅠㅠ
그리고 여기에 txt 파일로 이성적을 저장하거나,
마지막에 txt파일에 미리 저장해둬서 수고하셨습니다를 출력하고싶은데
어케해야할지 난감하네요ㅠㅠㅠ
고수님들 알려주세요!!!!!!!!!!!!!!!!!