.
‘5’ ‘6’ ‘7’ 与‘1’同理 与‘1’同理 与‘1’同理 struct student *sort(struct student *); struct student *p1,*p2,*t,*temp; temp=head->next; head->next=NULL; while(temp!=NULL) t=temp; temp=temp->next; p1=head; p2=head; while(t->aver
p2=p1; p1=p1->next; p1==p2? Y .
t->next=p1; p2->next=t; p1=head; while(p1!=NULL) p1=p1->next; clrscr();formhead();print(head); return(head); struct student *insert(struct student *); struct student *p,*q,*hed; hed=head; p=creat(); /*建链表*/ q=findw(head); /*找出传进来链表的表尾*/ N t->next=p1; head=t; q=NULL? Y q->next=p; return hed==NULL?p:hed; void input(struct student *); float temp; char c; clrscr(); printf(\scanf(\ 直到确认 printf(\ scanf(\ .
.
直到确认 c=getchar(); p->sex=c>'a'?c-32:c; 直到(p->sex=='M'||p->sex=='W') printf(\scanf(\ 直到确认 p->math=temp; 下面成绩同理
void putout(struct student *);
printf(\ p->num,p->name,p->sex,p->math,p->english,p->cp,p->computer,p->hthy,p->history,p->aver); printf(\---+------+------+\void print(struct student *); struct student *p; p=head; N .
p!=NULL Y .
putout(p);p=p->next; 直到p为空 getch(); int sure(); har c; getchar(); printf(\list!\\n\a empty printf(\c=getch(); N c==27 return 0; Y return 1; void frees( struct student *); struct student *p; p=head; while(p!=0) free(p); p=p->next; head=NULL; struct student *creat(void);
char c; struct student *p1,*p2,*head; int n=0,flag=1; p1=p2=(struct student *)malloc(LEN); head=NULL; input(p1); while(flag) .
.
n=n+1; n==1?head=p1:p2->next=p1; p2=p1; if(flag==1) printf(\if(flag==2) printf(\c=getch(); N (c=='N'||c=='n'||c=='Y'||c=='y')? Y flag=2; N c=='Y'||c=='y'? Y flag=0; p1=(struct student *)malloc(sizeof(struct student)); input(p1);flag=1; p2->next=NULL; return (head); struct student *load(void);
struct student *p1,*p2,*head=NULL; FILE *fp; N fp=fopen(\printf(\Y .