海量资源,欢迎共阅 STUDENT*create() { inti;ints;
STUDENT*h=NULL,*info; for(;;) { info=(STUDENT*)malloc(sizeof(STUDENT)); if(!info) { printf(\returnNULL; } inputs(\if(info->no[0]=='0')break;/*whenthefirstnumberis0,break*/ inputs(\printf(\s=0;/*sissum,beginswith0*/ for(i=0;i printf(\ 海量资源,欢迎共阅 if(i==1) printf(\ scanf(\storesprogramscores*/ if(info->score[i]>100||info->score[i]<0) printf(\}while(info->score[i]>100||info->score[i]<0); s=s+info->score[i]; } info->sum=s; info->order=0; info->next=h; h=info; } return(h); } inputs(char*prompt,char*s,intcount) { charp[255]; do{ printf(prompt); scanf(\ 海量资源,欢迎共阅 if(strlen(p)>count)printf(\}while(strlen(p)>count); strcpy(s,p); } /*Printinfor*/ voidprint(STUDENT*h) { inti=0; STUDENT*p; clrscr(); p=h; printf(\***\\n\printf(\printf(\while(p!=NULL) { i++; printf(\e,p->score[0],p->score[1],p->sum,p->order); p=p->next; } 海量资源,欢迎共阅 printf(\); } STUDENT*delete(STUDENT*h) { STUDENT*p,*q; chars[11]; clrscr(); printf(\scanf(\q=p=h; while(strcmp(p->no,s)&&p!=NULL) { q=p; p=p->next; } if(p==NULL) printf(\else { printf(\**\\n\ 海量资源,欢迎共阅 printf(\printf(\ printf(\core[0],p->score[1],p->sum,p->order); printf(\); getch(); if(p==h) h=p->next; else q->next=p->next; free(p); printf(\} return(h); } STUDENT*searchno(STUDENT*h) { STUDENT*p,*q; chars[11]; clrscr(); printf(\