第1个回答 2018-07-21
帮你改好了,并且也已经编译运行正常,自己看一下吧: #include #include #include #define n 30 struct student { char name[8]; int score; } R[n]; main ( ) { int num, i, j, max, temp; printf("\n请输入学生成绩: \n"); for (i=0; iR[max].score) max=j; if (max!=i) { temp = R[max].score; R[max]=R[i]; R[i].score= temp; } if ((i>0)&&(R[i].score