资源描述:
《学生成绩管理系统v》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、//成绩管理系统v3.0//能动1302王清栋1306030217#include#include#include#defineN30voidInput(longnum[],intscore[],intn,charname[][10]);voidTotalave(intscore[],intn);voidScoredes(longnum[],intscore[],intn,charname[][10]);voidScoreas(longnum[],intscore[],intn,charname[][10]);v
2、oidNumas(longnum[],intscore[],intn,charname[][10]);voidNameorder(longnum[],intscore[],intn,charname[][10]);voidSearchbyno(longnum[],intscore[],intn,intx,charname[][10]);voidSearchbyname(longnum[],intscore[],intn,charc[],charname[][10]);voidstatistis(intscore[],intn);voidList(longnum[],in
3、tscore[],intn,charname[][10]);intmain(){intn,score[N],c,x;longnum[N];charname[N][10];chary[10];printf("输入学生人数");scanf("%d",&n);//getchar();printf("1.Inputrecord");printf("2.Caculatetotelandaveragescoreofeverycourse");printf("3.Sortindescendingorderbyscore");printf("4.Sortinascendin
4、gorderbyscore");printf("5.Sortinascendingorderbynumber");printf("6.Sortindictionaryorderbyname");printf("7.Searchbynumber");printf("8.searchbyname");printf("9.Statisticanalysis");printf("10.Listrecord");printf("0.Exit");printf("Pleaseenteryourchoice:");printf("");for(
5、;;){scanf("%d",&c);switch(c){case1://录入学生学号和各科成绩Input(num,score,n,name);printf("Pleaseenteryourchoice:");break;case2://计算每门课程的总分和平均分Totalave(score,n);printf("Pleaseenteryourchoice:");break;case3://按chengji由高到低排出名次表Scoredes(num,score,n,name);printf("Pleaseenteryourchoice:");break;ca
6、se4://按chengji由低到高排出名次表Scoreas(num,score,n,name);printf("Pleaseenteryourchoice:");break;case5://按学号由小到大排出名次表Numas(num,score,n,name);printf("Pleaseenteryourchoice:");break;case6://按学号由小到大排出名次表Nameorder(num,score,n,name);printf("Pleaseenteryourchoice:");break;case7://按学号查询学生排名及其各科成绩p
7、rintf("请输入查找学号");scanf("%d",&x);Searchbyno(num,score,n,x,name);printf("Pleaseenteryourchoice:");break;case8://按姓名查询学生排名及其各科成绩printf("请输入查找姓名");getchar();gets(y);Searchbyname(num,score,n,y,name);break;printf("Pleaseenteryourchoice:");case9://成绩分析所占百分比statistis(scor