ImageVerifierCode 换一换
格式:DOC , 页数:20 ,大小:101.45KB ,
资源ID:8767623      下载积分:10 金币
验证码下载
登录下载
邮箱/手机:
图形码:
验证码: 获取验证码
温馨提示:
支付成功后,系统会自动生成账号(用户名为邮箱或者手机号,密码是验证码),方便下次登录下载和查询订单;
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/8767623.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请。


权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4009-655-100;投诉/维权电话:18658249818。

注意事项

本文(设计校际运动会管理系统.doc)为本站上传会员【仙人****88】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

设计校际运动会管理系统.doc

1、C语言课程设计 院系: 姓名: 学号: 班号: 指导教师: 日期:2007年9月 一、 题目要求 设计校际运动会管理系统,实现学校、运动员信息和运动项目的录入,比赛结果的输入,各个学校比赛结果的查询,生成团体总分报表,查看参赛学校信息和比赛项目信息。要求功能选择用菜单实现。 二、 需求分析 根据题目要求应提供键盘式菜单实现功能选择,还应提供信息的输入操作,由于在程序中提供查询功能所以应有显示、查找等操作。 三、 总体设计 根据上面的需求分析,可以将这个系统的设计分为1、信息输入模块 2、比赛结果录入模块 3、查询模块。具体校际运

2、动会管理系统分为 信息的输入、结果的输入、学校各个项目的得分的查寻、总体报表的生成。 四、 详细设计 1、 主函数 主函数一般设计的比较简洁,只提供输入,处理和输出部分的函数调用。其中功能模块用菜单方式选择。 流程图 显示一系列功能选项 ↓ ↓ N 输入n,判断n是否是0——9 Y 根据n的值调用各功能模块函数 [程序] main()

3、{ menu();/*menu 是菜单函数*/ } 菜单函数程序如下: menu() { int o,n; do { puts("\t\t*****************MENU********************"); puts("\n\n\t\t 1.The information to writein\n"); puts("\t\t 2.The race result records to writein\n"); puts("\t\t 3.Search the information\n");

4、 puts("\t\t 4.Exit\n"); puts("\n\t\t*****************************************"); puts("\n\nChoice you number:"); scanf("%d",&n); if(n<1||n>4){o=1;getchar();} /*对选择的数字进行判断*/ else o=0; }while(o==1); /*选择功能*/ switch(n) { case 1:writein();break;

5、 /*信息输入模块*/ case 2:resultin();break; /*比赛结果输入模块*/ case 3:search();break; /*查询模块*/ case 4:exit(0); /*退出*/ } } 各个模块的设计 1、 信息输入 [数据结构] 数据结构采用结构体的形式,包括学校、项目、运动员三个结构体。比如学校结构体成员包括学校校名、竞赛项目、得分;项目结构体成员包括项目名、权值。 struct student { char shool[10]; char name[10];

6、 char item[10]; char sex; int position; int mark; }stu[C]; /*stu[N]中每个数组元素对应一个学生*/ struct item { char name[10]; char sex; int mark; }it[C]; /*it[C]中每个数组元素对应一个项目*/ struct shool { char name[10]; char item[10]; int mark; }sho[C] /* sho[C]每个数组元素对应一个

7、学校;*/ [信息输入模块] 根据题意把与运动员的学校、名字、项目、性别、名次、分数作为结构体成员,如果要存放若干个运动员的信息就用结构体数组。 struct student { char shool[10]; char name[10]; char item[10]; char sex; int position; int mark; }stu[C]; /*stu[C]中每个数组元素对应一个运动员*/ stu[C]中的C为运动员

8、的个数,程序中采用宏定义的方式定义C=100,C的值可随时在源程序中改变。 输入运动员的学校、名字、项目、性别 输入运动员的名次并进入选择模式 if(t==2) 返回主函数 图2 输入模块流程图 /******************输入模块*****************/ writein() /*输入模块*/ { int t,r,i=0;extern j;char F,M;y=1;

9、 printf("\nPlease writein the student's name:\t");scanf("%s",&stu[i].name); /*输入名字*/ printf("\nPlease writein the student's shool:\t");scanf("%s",&stu[i].shool); /*输入学校*/ printf("\nPlease writein the student's item:\t");scanf("%s",&stu[i].item); /*输入项目*/ loop_1: printf("\nPlease wri

10、tein the student's sex(W or M):\t");scanf("%s",&stu[i].sex); /*输入性别*/ if(stu[i].sex!='W'&&stu[i].sex!='M')goto loop_1; /*选择函数*/ printf("\nPleasewritein the student's position:\t");scanf("%d",&stu[i].position); mark(j,i); loop_2:printf("\n\nDo again?\t1).Yes\t2).No\t"); sca

11、nf("%d",&t); if(t!=2&&t!=1)goto loop_2; /*调用goto结构*/ if(t==2)menu(); i++; if(t==1);f=1; printf("Success!!!\nPress any key+enter to menu..");scanf("%d",&r); /*返回主函数*/ menu(); } [结果录入模块] 该模块的功能是输入男女运动员的成绩,并由用户选择或定义各名次的分数。 [流程图] 提醒用户先输入运动员

12、信息 输入学校的代号、男女运动项目的代号 用户选择或定义各名次的分数 输入成绩并反回主函数 [程序] /**********************结果录入模块*********************/ resultin() /******结果录入模块*****/ { int h,r; extern N,M,W,y; if(y==0) { printf("Please establish system first!!\nPress any key +enter to men

13、u.. "); scanf("%d",&r); /******提醒用户输入运动员的基本信息*******/ menu(); } printf("\nThe number of shool attended is:"); scanf("%d",&N); printf("\nThe number of men item is:"); scanf("%d",&M); printf("\nThe number of women item is:"); scanf("%d",&W); /***

14、输入学校的代号、男女运动项目的代号****/ printf("\nThere are three form of marked you can choice:"); printf("\n\n\t1).1th--7,2th--5,3th--3,4th--2,5th--1."); printf("\n\n\t2).1th--5,2th--3,3th--1."); printf("\n\n\t3).Define by youself."); /*****用户自定义********/ loop: printf("\n\nChoice the number(1--3)

15、"); scanf("%d",&h); if(h>0&&h<4) switch(h) {case 1:j=1;break; case 2:j=2;break; case 3:define_mark(); } /*******选择积分模式*********/ else goto loop; /*******输入错误重新选择*******/ printf("Success!!!\nPress any key+enter to menu..");

16、scanf("%d",&r); menu(); /*******返回主函数*******/ } [查询模块] 该模块的功能是所有信息记录完毕后用户可以查询学校比赛成绩,查看参赛学校信息和比赛项目信息等。 [流程图] 选择查询模式并选择查询项目 学校查询程序 项目查询程序 返回主菜单 [程序] /*****************查询模块*****************/ search() { int e;char c;extern f; loop:printf("\

17、nThe form of searching you want to choice:\n\t1).By school\n\t2).Bt item\n\t3).To menu\t"); /************选择查询模式**************/ scanf("%d",&e); switch(e) { case 1:search_school();break; case 2:search_item();break; case 3:menu(); } if(e>4||e<1)goto loop

18、 printf("Press any key+enter to menu..");scanf("%s",&c);menu(); } search_school() /**********学校查询程序***********/ { int x,sum=0,w=0; struct student s; printf("\nPlease enter the name of the school that you want to search:"); scanf("%s",&s.shool); printf_face

19、); for(x=0;x

20、hool();} } search_item() /*********项目查询程序********/ { int x,sum=0,w=0; struct student s; printf("\nPlease enter the name of the item that you want to search:"); scanf("%s",&s.item); printf_face(); /********数据输入*********/ for(x=0

21、x

22、分的函数即用来确定不同的名次所得的不同分数。 mark(int j,int i) { int g; extern p[15],q[15]; if(j==1) {if(stu[i].position==1)stu[i].mark=7; else if(stu[i].position==2)stu[i].mark=5; else if(stu[i].position==3)stu[i].mark=3; else if(stu[i].position==4)stu[i].mark=2; else if(stu[i].positi

23、on==5)stu[i].mark=1; } if(j==2) { if(stu[i].position==1)stu[i].mark=5; else if(stu[i].position==2)stu[i].mark=3; else if(stu[i].position==3)stu[i].mark=1; } if(j==3) { for(g=0;g<15;g++)if(stu[i].position==p[g])stu[i].mark=q[g];} } define_mark() /*自定义名次分数

24、的子函数*/ { static int p[15],q[15],a,b,j; for(a=0;a<15;a++) { printf("\nThe position(1--15):");scanf("%d",&p[a]); printf("\nThe mark you want to define(Integral):");scanf("%d",&q[a]);/*自定义*/ loop:printf("\nDo you want define more:\t1).Yes\t2).No");scanf("%d",&b); if(b==2)break; if(

25、b!=1)goto loop; } j=3; } printf_one(int x) /*运动员个人信息的输出函数*/ { printf("\n%-20s%-20s%-20s%-5c%-9d%-5d",stu[x].shool,stu[x].name,stu[x].item,stu[x].sex,stu[x].position,stu[x].mark); } printf_sum(int sum) /*团体成绩的输出函数*/ { printf("\n\nThe sum of mark is:\t %d",sum); printf("\nThe shool

26、 number is: \t%d",N); printf("\nThe item number is: \t%d\n",W+M); } printf_face() /**学校成绩输出函数*/ { printf("\n\nSchool name student name item sex position mark"); } [原程序] #include #define C 100 int y=0,f=0,j,W,M,N,p[15],q[15]; struct s

27、tudent { char shool[10]; char name[10]; char item[10]; char sex; int position; int mark; }stu[C]; struct item { char name[10]; char sex; int mark; }it[C]; struct shool { char name[10]; char item[10]; int mark; }sho[C]; main() { menu(); } menu() { int

28、 o,n; do { puts("\t\t*****************MENU********************"); puts("\n\n\t\t 1.The information to writein\n"); puts("\t\t 2.The race result records to writein\n"); puts("\t\t 3.Search the information\n"); puts("\t\t 4.Exit\n"); puts("\n\t\t***********

29、"); puts("\n\nChoice you number:"); scanf("%d",&n); if(n<1||n>4){o=1;getchar();} else o=0; }while(o==1); switch(n) { case 1:writein();break; case 2:resultin();break; case 3:search();break; case 4:exit(0); } } writei

30、n() { int t,r,i=0;extern j;char F,M;y=1; printf("\nPlease writein the student's name:\t");scanf("%s",&stu[i].name); printf("\nPlease writein the student's shool:\t");scanf("%s",&stu[i].shool); printf("\nPlease writein the student's item:\t");scanf("%s",&stu[i].item); loop_1: printf("\nPle

31、ase writein the student's sex(W or M):\t");scanf("%s",&stu[i].sex); if(stu[i].sex!='W'&&stu[i].sex!='M')goto loop_1; printf("\nPleasewritein the student's position:\t");scanf("%d",&stu[i].position); mark(j,i); loop_2:printf("\n\nDo again?\t1).Yes\t2).No\t"); scanf("%d",&t); if(t!=2&&t!=

32、1)goto loop_2; if(t==2)menu(); i++; if(t==1);f=1; printf("Success!!!\nPress any key+enter to menu..");scanf("%d",&r); menu(); } resultin() { int h,r; extern N,M,W,y; if(y==0) { printf("Please establish system first!!\nPress any key +enter to menu.. "); scanf("%d",&r); men

33、u(); } printf("\nThe number of shool attended is:"); scanf("%d",&N); printf("\nThe number of men item is:"); scanf("%d",&M); printf("\nThe number of women item is:"); scanf("%d",&W); printf("\nThere are three form of marked you can choice:"); printf("\n\n\t1).1th--7,2th--5,3th--3,

34、4th--2,5th--1."); printf("\n\n\t2).1th--5,2th--3,3th--1."); printf("\n\n\t3).Define by youself."); loop: printf("\n\nChoice the number(1--3):"); scanf("%d",&h); if(h>0&&h<4) switch(h) {case 1:j=1;break; case 2:j=2;break; case 3:define_mark(); } else goto loop;

35、 printf("Success!!!\nPress any key+enter to menu..");scanf("%d",&r); menu(); } search() { int e;char c;extern f; loop:printf("\nThe form of searching you want to choice:\n\t1).By school\n\t2).Bt item\n\t3).To menu\t"); scanf("%d",&e); switch(e) { case 1:search_school();break;

36、 case 2:search_item();break; case 3:menu(); } if(e>4||e<1)goto loop; printf("Press any key+enter to menu..");scanf("%s",&c);menu(); } search_school() { int x,sum=0,w=0; struct student s; printf("\nPlease enter the name of the school that you want to search:"); scanf("%s

37、",&s.shool); printf_face(); for(x=0;x

38、t s; printf("\nPlease enter the name of the item that you want to search:"); scanf("%s",&s.item); printf_face(); for(x=0;x

39、ress again!");search_item();} } mark(int j,int i) { int g; extern p[15],q[15]; if(j==1) {if(stu[i].position==1)stu[i].mark=7; else if(stu[i].position==2)stu[i].mark=5; else if(stu[i].position==3)stu[i].mark=3; else if(stu[i].position==4)stu[i].mark=2; else if(s

40、tu[i].position==5)stu[i].mark=1; } if(j==2) { if(stu[i].position==1)stu[i].mark=5; else if(stu[i].position==2)stu[i].mark=3; else if(stu[i].position==3)stu[i].mark=1; } if(j==3) { for(g=0;g<15;g++)if(stu[i].position==p[g])stu[i].mark=q[g];} } define_mark()

41、 { static int p[15],q[15],a,b,j; for(a=0;a<15;a++) { printf("\nThe position(1--15):");scanf("%d",&p[a]); printf("\nThe mark you want to define(Integral):");scanf("%d",&q[a]); loop:printf("\nDo you want define more:\t1).Yes\t2).No");scanf("%d",&b); if(b==2)break; if(b!=1)goto loo

42、p; } j=3; } printf_one(int x) { printf("\n%-20s%-20s%-20s%-5c%-9d%-5d",stu[x].shool,stu[x].name,stu[x].item,stu[x].sex,stu[x].position,stu[x].mark); } printf_sum(int sum) { printf("\n\nThe sum of mark is:\t %d",sum); printf("\nThe shool number is: \t%d",N); printf("\nThe item num

43、ber is: \t%d\n",W+M); } printf_face() { printf("\n\nSchool name student name item sex position mark"); } 主函数菜单  信息输入模块 结果录入模块 查询模块 总结: 通过此次C语言课程设计实习,我收获颇多。以前只是为了考试去学习,而这次实习是将所学知识运用到实际中。 此次实习中,我成功做出了这道题:建立校际运动会管理系统的文件题。本题看起来很烦琐,

44、但理清思路后,就很简单了,一定程度上来说,复杂性决定了程序的使用性和功能性较高。指导书中有关文件的题目差不多都大同小异,只要一题会做,其他题目也就迎刃而解,只要将各功能模块融会贯通并加以适当调整即可,但前提还是必须对指导书里的例题熟练掌握。然而,这同时又成为了指导书的一个弊端,我相信有关文件题目的多样化会更能提高学生的编程能力。因为题目较简单,完全可以独立编程,但程序的先进性还有待进一步提高。程序的简单性和题目的局限性从而也决定了程序的实用性和功能性较差,在编程过程中还是应该特别注意充分理解题目要求和各循环语句的充分调用和理解。 我知道,这只是一个小小的开端,以后的路还很长,还要继续坚持下去

45、才能具备一定的编程能力。 附:原程序 #include #define A 100 int y=0,f=0,j,W,M,N,p[15],q[15]; struct student { char shool[20]; char name[20]; char item[20]; char sex; int position; int mark; }stu[A]; struct item { char name[20]; char sex; int mark; }it[A]; struct sho

46、ol { char name[20]; char item[20]; int mark; }sho[A]; main() { menu(); } menu() { int w1,n; do { puts("\t\t*****************MENU********************"); puts("\n\n\t\t 1.The information to writein\n"); puts("\t\t 2.The race result records to writein\n");

47、 puts("\t\t 3.Search the information\n"); puts("\t\t 4.Exit\n"); puts("\n\t\t*****************************************"); puts("\n\nChoice you number:"); scanf("%d",&n); if(n<1||n>4){w1=1;getchar();} else w1=0; }while(w1==1); switch(n) { case 1:est

48、ablish();break; case 2:enter();break; case 3:search();break; case 4:exit(0); } } establish() { int h,r; extern N,M,W; y=1; printf("\nThe number of shool attended is:"); scanf("%d",&N); printf("\nThe number of men item is:"); scanf("%d",&M); printf("\nThe number of

49、 women item is:"); scanf("%d",&W); printf("\nThere are three form of marked you can choice:"); printf("\n\n\t1).1th--7,2th--5,3th--3,4th--2,5th--1."); printf("\n\n\t2).1th--5,2th--3,3th--1."); printf("\n\n\t3).Define by youself."); loop: printf("\n\nChoice the number(1--3):"); scanf("%d

50、",&h); if(h>0&&h<4) switch(h) {case 1:j=1;break; case 2:j=2;break; case 3:define_mark(); } else goto loop; printf("Success!!!\nPress any key+Enter to menu..");scanf("%d",&r); menu(); } enter() { int t,r,i=0;extern j,y;char F,M; if(y==0) { printf("Please

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服