#include #include struct student{ int n; int c; char l[8]; float m; float p; float e; float s; }stu[7]={{10001,11,"Zhang",99.5,88.5,89.5},{10002,12,"Yang",77.9,56.5,87.5},{10003,11,"Liang",92.5,99.0,60.5},{10004,11,"Cai",89.6,56.9,90.5},{10005,14,"Fu",55.6,67.9,98.9},{10006,12,"Mao",22.1,45.9,99.2},{10007,13,"Zhan",35.6,67.0,88.0}}; //求和函数 void sum(struct student stu[7]) { int i; for(i=0;i<7;i++) { stu[i].s=stu[i].m+stu[i].p+stu[i].e; } } // 排序函数 void sort(struct student stu[],int len) { int i,j; for(i=0;istu[j].c||(stu[k].c==stu[j].c&&stu[k].s