欢迎来到天天文库
浏览记录
ID:51949033
大小:17.68 KB
页数:10页
时间:2020-03-20
《校级运动会管理系统c语言程序.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、#include#include#include#include#defineSIZE9#defineN3#defineWM3voidbsxm();//比赛项目voidcsxx();//参赛学校voidttzf();//团体总分voidInformation();voidmain();voidmenu();voidprintf_back();voidsaveathlete();voidsaveprogram();voidsave
2、school();voidsavescore();voidSearch();inti;FILE*fp1,*fp2,*fp3,*fp4;structathlete//定义运动员信息{charuniv[5];charname[8];charprog[15];charmingci[5];intscore;}at[SIZE];structxuexiao//定义学校信息{charuniv[5];charprog[15];intnum_athlete;}xx[N];structprogram//定义项目信息{cha
3、rprog[5];intquming;charath1[5];charath2[5];charuniv1[5];charuniv2[5];}pro[WM];structzongfen//定义学校得分信息{charuniv[5];charprog1[5];charprog2[5];charprog3[5];intscore1;intscore2;intscore3;inttotal_score;}zf[N];voidInformation()//进入信息录入系统选择系统子函数{intn,w;do{puts
4、("");puts("tt***^__^Welcometoload信息录入system!^__^***");puts("tt*************************MENU*************************");puts("tt********1.saveathlete**************");//运动员姓名录入puts("tt********2.saveschool**************");//运动员学校录入puts
5、("tt********3.saveprogram()**************");//参加项目录入puts("tt********4.back**************");//退出puts("tt******************************************************");printf("Choicyournumber(1-4):[]bb");scanf("%d",&n);if(n<1
6、
7、n>4){w=1;printf("
8、tt----------------------DATAERROR!----------------------");getchar();}elsew=0;}while(w==1);switch(n){case1:saveathlete();break;//保存运动员信息子函数case2:saveschool();break;//保存学校信息子函数case3:saveprogram();break;//保存项目比赛信息子函数case4:exit(0);}}voidsaveathlete(
9、)//保存运动员信息子函数{printf("请输入各项目获奖运动员的信息:");for(i=0;i10、"得分:");scanf("%d",&at[i].score);}fp1=fopen("ath","w");for(i=0;i
10、"得分:");scanf("%d",&at[i].score);}fp1=fopen("ath","w");for(i=0;i
此文档下载收益归作者所有