void InputStu(struct student stu[]) { pp=stu; system(”cls”); int i;
printf(”Number of students you want to enter information:”); scanf(”%d”,&input); if((fp=fopen(”inputdata.sys”,”wb+\"))==NULL) { printf(\"Cannot open file strike any key exit!\"); getch();exit(1); }
pp=stu;int id,i,flag=1; if((fp=fopen(”modifydata.sys”,”wb+”))==NULL) {printf(”Cannot open file strike any key exit!”); getch();exit(1);}
void FindStu(struct student stu[])
{system(\"cls\");int i=0,id,flag=1,chose;
printf(”\\nPlease select query: 1。No. inquiries by school;2.Query by class;3。Query by name\\n”);
scanf(\"%d\",&chose); switch(chose){
case 1:printf(\"Please enter your query No。 students:”); scanf(\"%d”,&id); for(i=0;i〈input;i++)
{if (stu[i]。num==id) { flag=0;
stu[i]。sum=stu[i].score1+stu[i].score2+stu[i].score3; stu[i].ave=stu[i].sum/3; printf(”\\nNo。 Studies\\ Name\\ No。 classes\\ The first subjec\\ The second subject\\ The third subject\\Average \\Total\\n”);
if((fp=fopen(\"insertdata。sys”,”wb+\"))==NULL) {printf(”Cannot open file strike any key exit!”); getch();exit(1);}
void ListStu(struct student stu[]) {int i=0;
for(i=0;iprintf(”\\nNo. Studies\\ Name\\ No. classes\\ The first subjec\\ The second subject\\ The third subject\\Average \\Total\\n”); for(i=0;i{printf(\"\\n %d %s %d \%d \%d \%d \%d %d”,stu[i]。num,stu[i]。name,stu[i].classid,stu[i]。score1,stu[i]。score2,stu[i]。score3,stu[i].ave, stu[i].sum); } getch();}