#include#include#define NULL 0#define LTS sizeof(struct mark)struct mark{unsigned long int num;char name[20];intclas ;float math;float English;float computer;float total;float ver;struct mark *next;};struct mark *D_insertsort(struct mark *head){ int flag=0,a,b;struct mark *f,*g,*q,*r,*s,*t;f=head;q=f->next;f->next=NULL;t=f;printf(" 按数学请按 1,按英语请按 2,按微机请按 3,按总成绩请按 4:\n");scanf("%d",&a);switch(a){case 1: for(q;q!=NULL;){r=q;q=q->next;r->next=NULL;if(f->math<=r->math){ r->next=f;f=r;t=f;}else if(f->math>r->math){while(f!=NULL){if(f->next!=NULL){s=f->next;if (s->math<=r->math){r->next=f->next;f->next=r;break;}elsef=f->next;}else if(f->next==NULL){f->next=r;break;}}}}break;case 2: for(q;q!=NULL;){r=q;q=q->next;r->next=NULL;if(f->English<=r->English) {}r->next=f;f=r;t=f;else if(f->English>r->English){while(f!=NULL){if(f->next!=NULL){s=f->next;if (s->English<=r->English){r->next=f->next;f->next=r;break;}elsef=f->next;}else if(f->next==NULL){f->next=r;break;}}}}break;case 3: for(q;q!=NULL;){r=q;q=q->next;r->next=NULL; if(f->computer<=r->computer){}r->next=f;f=r;t=f;else if(f->computer>r->computer){while(f!=NULL){{if(f->next!=NULL)s=f->next;if (s->computer<=r->computer){r->next=f->next;f->next=r;break;}elsef=f->next;}else if(f->next==NULL){f->next=r;break;}}}}break;case 4: for(q;q!=NULL;){r=q;q=q->next;r->next=NULL;if(f->total<=r->total){r->next=f; f=r;t=f;}else if(f->total>r->total){while(f!=NULL){{if(f->next!=NULL)s=f->next;if (s->total<=r->total){r->next=f->next;f->next=r;break;}elsef=f->next;}else if(f->next==NULL){f->next=r;break;}}}break;}default: {printf("******** 你的输入有错,请重新输入\n");}} return(t);}struct mark *S_insertsort(struct mark *head){ int flag=0,a,b;struct mark *f,*g,*q,*r,*s,*t;f=head;q=f->next;f->next=NULL;t=f;printf(" 按数学请按 1,按英语请按 2,按微机请按 3,按总成绩请按 4:\n");scanf("%d",&a);switch(a){case 1: for(q;q!=NULL;){r=q;q=q->next;r->next=NULL;if(f->math>=r->math){r->next=f;f=r;t=f;}else if(f->mathmath){while(f!=NULL) {if(f->next!=NULL){s=f->next;if (s->math>=r->math){r->next=f->next;f->next=r;break;}elsef=f->next;}else if(f->next==NULL){f->next=r;break;}}}}{case 2: for(q;q!=NULL;)r=q;q=q->next;r->next=NULL;if(f->English>=r->English){r->next=f;f=r;t=f;}else if(f->EnglishEnglish){while(f!=NULL){if(f->next!=NULL) {s=f->next;if (s->English>=r->English){r->next=f->next;f->next=r;break;}elsef=f->next;}else if(f->next==NULL){f->next=r;break;}}}}case 3: for(q;q!=NULL;){r=q;q=q->next;r->next=NULL;if(f->computer>=r->computer){r->next=f;f=r;t=f;}else if(f->computercomputer){while(f!=NULL){if(f->next!=NULL){ s=f->next;if (s->computer>=r->computer){r->next=f->next;f->next=r;break;}elsef=f->next;}else if(f->next==NULL){f->next=r;break;}}}}case 4: for(q;q!=NULL;){r=q;q=q->next;r->next=NULL;if(f->total>=r->total){r->next=f;f=r;t=f;}else if(f->totaltotal){while(f!=NULL){if(f->next!=NULL){s=f->next;if (s->total>=r->total) {r->next=f->next;f->next=r;break;}elsef=f->next;}else if(f->next==NULL){f->next=r;break;}}}}}head=t;return(t);} void began()/* 开始界面 */{printf("\t ‖≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡‖\n");\n");\n");printf("\t ‖☆◎★★★★学生成绩管理系统★★★★◎☆‖printf("\t ‖≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡‖printf("\t ‖ (0) 学籍录 入‖ (1) 成绩录 入‖\n");printf("\t ‖≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡‖\n");\n");\n");printf("\t ‖ (2) 显 示 全 部 学 生 成绩‖ (3) 删 除 学 生 成 绩‖\n");printf("\t ‖≡≡≡≡≡≡≡≡≡≡≡≡≡≡‖≡≡≡≡≡≡≡≡≡≡≡≡≡≡‖printf("\t ‖ (4) 显 示 某 学 生 成 绩‖ (5) 显示指定分数段学生成绩‖printf("\t ‖≡≡≡≡≡≡≡≡≡≡≡≡≡≡‖≡≡≡≡≡≡≡≡≡≡≡≡≡≡‖\n");printf("\t ‖ (6) 显示班级人数及平均成绩‖(7) 成 绩 排 序 并 显 示 ‖\n");printf("\t ‖≡≡≡≡≡≡≡≡≡≡≡≡≡≡‖≡≡≡≡≡≡≡≡≡≡≡≡≡≡‖\n");}void main(){struct mark *head;struct mark *Lp,*mp,*up,*rp,*rup;struct mark *zp,*jp;struct mark *sp,*hp;struct mark *xp,*ip,*ap;struct mark *fp,*ep;struct mark *bp;struct mark *pp;int n,i,k,b,flag,min,max;float s;head=NULL;began();for (i=0;i<2;i=0){printf("******** 请输入数字 \n");scanf("%d",&n);switch (n){ case 0:{Lp=(struct mark *)malloc(LTS);printf("****** 请输入学生学号 \n");scanf("%lu",&Lp->num);printf("****** 请输入学生名字 \n");scanf("%s",&Lp->name);printf("******** 请输入学生班级 \n");scanf("%d",&Lp->clas);Lp->computer=NULL;Lp->English=NULL;Lp->math=NULL;Lp->total=NULL;Lp->ver=NULL;if(head==NULL){head=Lp;mp=Lp;mp->next=NULL;}else{Lp->next=NULL;mp->next=Lp;mp=Lp;}printf("******** 学籍输入成功 \n");began();break;}case 1:{up=(struct mark *)malloc(LTS);printf("******** 请输入学生学号 \n");scanf("%lu",&up->num);if(head==NULL){printf("******** 还没有学生学籍 \n");}else{rp=(struct mark *)malloc(LTS); rp=head;while(rp!=NULL){if(rp->num==up->num){printf("******** 请输入数学成绩 \n");scanf("%f",&rp->math);printf("******** 请输入英语成绩 \n");scanf("%f",&rp->English);printf("******** 请输入微机成绩 \n");scanf("%f",&rp->computer);rp->total=(rp->math+rp->English+rp->computer);rp->ver=rp->total/3;flag=1;break;}else{rp=rp->next;flag=0;}}if(flag==1)printf("****** 学生成绩录入成功 \n");else if (flag==0)printf("****** 没有该学生的学籍 \n");}began();break;}case 2:{xp=head;if(xp!=NULL){ do{printf("******** 学号printf("******** 姓名printf("******** 班级%lu\n",xp->num);%s\n",xp->name);%d\n",xp->clas);if(xp->math==NULL){printf("******** 还没录入该学生成绩 ");}else if(xp->math!=NULL){printf("******** 数学成绩printf("******** 英语成绩printf("******** 微机成绩printf("******** 总成绩printf("******** 平均成绩}科教兴国14。