运动会管理系统php,运动会管理系统源代码.doc

运动会管理系统源代码

运动会管理系统源代码include#include#includestruct student /* 定义链表 */{long num;char name[10];char danwei[10];int xiangmu;int chengji;struct student *next;};struct student *creat(struct student *h); /*s 输入函数 */struct student *findstudent(struct student *h); /* 查找函数 */struct student *sort(struct student *h); /* 排序函数 */main(){int b,c=1;struct student *head,*p,*f; /* 定义表头指针 */head=NULL; /* 创建一个空表 */printf("\t\t\t**********************\n");printf("\t\t\t****运动会管理系统****\t\t\n");printf("\t\t\t**********************\n");do /* 循环使用系统中的功能 */{printf("*************************************************************************\n");printf("\t\t请输入1或2或3进行功能选择\n"); printf("\t\t输入1---------------------进行输入功能\n"); printf("\t\t输入2---------------------进行查找功能\n"); printf("\t\t输入3---------------------进行排序功能\n");printf("*************************************************************************\n"); scanf("%d",&b); switch(b) /* 进入函数 */ {case 1:head=creat(head);break; case 2:p=findstudent(head);break; case 3:f=sort(head);break; default:printf("输入错误,请从新输入");}printf("*************************************************************************\n");printf("否进行其他功能?\n");printf("是输入------1,否输入------2:\n");scanf("%d",&c);}while(c==1);}/* 输入功能 */struct student *creat(struct student *h){struct student *p1,*p2; /* 定义链表指针 */p1=p2=(struct student*)malloc(sizeof(struct student)); /* 申请新结点 */printf("\n-------------------------------------------------------\n");printf("请依次输入运动员的号码、姓名、单位、项目(run为1,jump为2,swim为3)、成绩\n学号输入0时,结束输入!\n");printf("\n-------------------------------------------------------\n");if(p2!=NULL) printf("请输入号码:");scanf("%ld",&p2->num); /* 输入结点

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值