c语言程序设计~用高级语言实现篮球联赛个人技术数据处理系统

上传人:206****923 文档编号:41880344 上传时间:2018-05-31 格式:DOC 页数:14 大小:192KB
返回 下载 相关 举报
c语言程序设计~用高级语言实现篮球联赛个人技术数据处理系统_第1页
第1页 / 共14页
c语言程序设计~用高级语言实现篮球联赛个人技术数据处理系统_第2页
第2页 / 共14页
c语言程序设计~用高级语言实现篮球联赛个人技术数据处理系统_第3页
第3页 / 共14页
c语言程序设计~用高级语言实现篮球联赛个人技术数据处理系统_第4页
第4页 / 共14页
c语言程序设计~用高级语言实现篮球联赛个人技术数据处理系统_第5页
第5页 / 共14页
点击查看更多>>
资源描述

《c语言程序设计~用高级语言实现篮球联赛个人技术数据处理系统》由会员分享,可在线阅读,更多相关《c语言程序设计~用高级语言实现篮球联赛个人技术数据处理系统(14页珍藏版)》请在金锄头文库上搜索。

1、题目:篮球赛个人技术统计系统题目:篮球赛个人技术统计系统设某篮球联赛要统计 20 名著名球员个人技术数据。要求用高级语言实现篮球联赛个人技术 数据处理系统。该系统在磁盘上存储如下信息: 1。每场球赛的个人技术数据。一场球一个人的技术数据包括:姓名,所属球队,三分球个 数,篮板球个数,扣篮成功次数,抢断次数,得分,比赛日期。 2。个人技术数据汇总表。表中反映了每个人的技术数据的累计结果。表羡为:姓名,三分 球总数,篮板球总数,扣篮成功总次数,抢断总次数,得分总数,比赛场数。 本系统功能如下: 1。创建存储每常球赛个人技术数据的存储系统(第一次输入个人技术数据时) ,然后自动 创建存储个人技术数据

2、汇总表的存储系统。 2。每场比赛后,添加个人技术数据,然后自动修改个人技术数据汇总表 3。能输出当前的个人技术数据汇总表 4。能输出指定技术项目平均每场数据较高的前三名运动员的姓名,所在队名和平均每场的 单项数据。程序: /* Basketball Statistic Information System* Write By: Yan Yi Ling;* Date: 2008-09-10*/#define MAX_PLAYER 100 #define P3 0 #define SD 1 #define RB 2 #define CT 3 #define CO 4 #define MAX_TOP

3、 3 #define false 0 #define true 1struct basketballchar name20; /* players name */char team20; /* players team */short point_3; /* three pointer */short rebound; /* rebound */short sd; /* slam dunk */short cut; /* cut */short course; /* couese */char date11; /* race date */ playerMAX_PLAYER;substr(ch

4、ar *p_from, char *p_to, int p_start, int p_len) int index = 0, stop = p_start + p_len;while(p_start 9 ) continue;res = res * 10 + (int)p_strindex - 48;return res; split(char *p_str, char p_chr) int index;for(index = 0; p_strindex != p_chr +index) /* do nothing here */return index; #include “stdio.h“

5、 #include “conio.h“short player_len = 0; /* how many players in the system current */main() short op_type, op_skill;char tmp20;loadInfo();while(1) showMenu();scanf(“%d“ , switch(op_type) case 1:inputPlayerInfo();break;case 2:printf(“Please input players name: “);scanf(“%s“, tmp);displayPlayerInfo(tm

6、p);break;case 3:displayPlayerInfo();break;case 4:printf(“Please input players name: “);scanf(“%s“, tmp);displayPlayerCount(tmp);break;case 5:printf(“%d = three pointn“, P3);printf(“%d = slam dunkn“, SD);printf(“%d = reboundn“, RB);printf(“%d = cutn“, CT);printf(“%d = coursen“, CO);puts(“Please choos

7、e one of the skill you want to order: “);scanf(“%d“, displayTopInfo(op_skill);break;case 6:puts(“Thank you to use this system!“);puts(“Bye!“);return;default:puts(“Input error! You must input number between 1 and 5!“);break;printf(“Enter to continue!“);getchar(); getchar();puts(“nnnnnnnnnnnnnnnn“); /

8、* show menu and return users operation*/ int showMenu() showTab(3);puts(“Basketball Statistic Information System“);showTab(7);puts(“Write By: Yan Yi Ling“);puts(“1: Input player information“);puts(“2: Display player information“);puts(“3: Display all of the player information“);puts(“4: Display play

9、ers count information“);printf(“5: Display TOP %d informaionn“, MAX_TOP);puts(“6: Exitn“);printf(“Choose one of the function you want: “); /* show tab in the screen* param p_tab: show many tab will print to the screen*/ showTab(int p_tab) short index;for(index = 0; index = MAX_PLAYER) puts(“Too many

10、 information!“);return;printf(“Please input players name: “);scanf(“%s“, playerplayer_len.name);printf(“Please input players team: “);scanf(“%s“, playerplayer_len.team);printf(“Please input race date(YYYY-MM-DD): “);scanf(“%s“, playerplayer_len.date); getchar(); /* forcus enter */printf(“How many th

11、ree pointer did he/she got: “);scanf(“%d“, printf(“How many rebound did he/she got: “);scanf(“%d“, printf(“How many slam dunk did he/she got: “);scanf(“%d“, printf(“How many cut did he/she got: “);scanf(“%d“, printf(“How many course did he/she got: “);scanf(“%d“, +player_len;if( saveInfo() )puts(“sa

12、ve information success!“); /* display players informaion according to players name*/ displayPlayerInfo(char *p_name) short index, flag = false;printf(“There are %d records in the system.n“, player_len);puts(“NametTeamtDatet3 PointertSlam DunktReboundtCuttCourset“);for(index = 0; index 0; tmp-) toptm

13、p = toptmp - 1;top0 = index;/* end */* display information */for( index = 0; index len; index+) printf(“TOP %d: %sttt%dn“, index + 1, nametopindex, pointstopindex);/* end */数据测试结果(程序调试结果): 1 开始输入信息:2 输入队员信息:3 输入完信息后, 显示成员信息(需输入程序中已有的成员名,否则出错。 ):4 显示成员信息(正确输入成员名。 ):5 显示成员列表:6 显示成员各项技能的得分情况:7 选择需要某项技能的成员得分排名(降序):8 例如:选择“1”选项,输出三分球的降序排列得分情况:9 结束操作(选择“6”选项):感想(错误修正): 不足之处:输入比赛日期时,不能用 YYYY-MM-DD 的形式,只能用 YY-M-D 的形式,否 则输入各项技能得分时,格式不对。

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号