资源描述:
《c集中上机实验报告.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、C网页设计集中上机报告学生:学号:班级:专业:目录集中上机总结4(正文内容)#include"stdio.h"#include"stdlib.h"#include"ctype.h"#include"malloc.h"#include"string.h"#include"conio.h"#include"mem.h"#defineN4typedefstructstuNode{charno[9];charname[15];charsex[2];intage;intscore[N];floatsum;floataverage;intorder;structstuNo
2、de*next;}STUDENT;STUDENT*init();STUDENT*create();STUDENT*delete_student(STUDENT*h);voidinputs(char*prompt,char*s,intcount);voidprint(STUDENT*h);voidsearch(STUDENT*h);voidsave(STUDENT*h);STUDENT*load();voidcomputer(STUDENT*h);STUDENT*insert(STUDENT*h);voidcopy();voidappend();STUDENT*
3、sort(STUDENT*h);intmenu_select();intsubmenu();voidgrade();voidclass0(STUDENT*h);voidclass6(STUDENT*h);voidclass7(STUDENT*h);voidclass8(STUDENT*h);voidclass9(STUDENT*h);voidmain(){inti;STUDENT*head;head=init();clrscr();printf();printf("t****************");printf("t*WELCOMETOM
4、YSTUDENTS'SCORESYSTEM");printf(t*********************************************);for(;;){switch(menu_select()){case0:head=init();break;case1:head=create();break;case2:head=delete-student(head);break;case3:append();break;case4:head=insert(head);break;case5:print(head);break;case6:
5、search(head);break;case7:save(head);break;case8:head=load();break;case9:copy();break;case10:computer(head);break;case11:head=sort(head);break;case12:grade();break;case13:exit(0);}}}intmenu_select(){char*menu[]={"**************MENU************","0.Initlist","1.Addrecordstolist","2.De
6、letearecordfromlist","3.Appendarecordtolist","4.Insertarecordtolist","5.Printlist","6.Searchrecordonname","7.Savethefile","8.Loadthefile","9.Backupthefile","10.Averageofeachscore","11.Sortandorder","12.Classificationthescore","13.Quit"};chars[3];intc,i;gotoxy(1,25);printf("pressanyk
7、eytocontinue...");getch();clrscr();gotoxy(1,1);textcolor(YELLOW);textbackground(BLUE);gotoxy(19,2);putch(0xc9);for(i=1;i<40;i++)putch(0xcd);putch(0xbb);for(i=3;i<20;i++){gotoxy(19,i);putch(0xba);gotoxy(63,i);putch(0xba);}gotoxy(19,20);putch(0xc8);for(i=1;i<44;i++)putch(0xcd);putch
8、(0xbc);window(20,3,