`#include
struct sturec {
char id[8];
char name[8];
float e,m,c,sum;
}; void print(struct sturec *p); void format(struct sturec lei[N]); int research(struct sturec *p4,char id[8]); void input(struct sturec *p1); int main(){
char id[8];
int a;
struct sturec stu[N],*point=stu;
printf("please input student's id name englishscore mathscore chinesescore\n");
input(point);
format(stu);
print(point);
printf("please input id which you want to research\n");
scanf("%s",id);
a=research(stu,id);
printf("%s %s %f",stu[a].id,stu[a].name,stu[a].sum);
return 0;
} void print(struct sturec *p) {
for(int i=0;iid,(p+i)->name,(p+i)->sum);
}
} void input(struct sturec *p2) {
for(int i=0;isum=p2->c+p2->e+p2->m;
p2++;
}
} void format(struct sturec lei[N]) {
struct sturec mid;
for(int i=0;ilei[j+1].sum)
{
mid=lei[j];
lei[j]=lei[j+1];
lei[j+1]=mid;
}
}
}
} int research(struct sturec *p4,char id[8]) {
for(int i=0;iid,id)==0)
{
return i;
break;
}
}
}`