运动会管理系统php,运动会管理系统源代码.doc
運(yùn)動(dòng)會(huì)管理系統(tǒng)源代碼
運(yùn)動(dòng)會(huì)管理系統(tǒng)源代碼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 輸入函數(shù) */struct student *findstudent(struct student *h); /* 查找函數(shù) */struct student *sort(struct student *h); /* 排序函數(shù) */main(){int b,c=1;struct student *head,*p,*f; /* 定義表頭指針 */head=NULL; /* 創(chuàng)建一個(gè)空表 */printf("\t\t\t**********************\n");printf("\t\t\t****運(yùn)動(dòng)會(huì)管理系統(tǒng)****\t\t\n");printf("\t\t\t**********************\n");do /* 循環(huán)使用系統(tǒng)中的功能 */{printf("*************************************************************************\n");printf("\t\t請(qǐng)輸入1或2或3進(jìn)行功能選擇\n"); printf("\t\t輸入1---------------------進(jìn)行輸入功能\n"); printf("\t\t輸入2---------------------進(jìn)行查找功能\n"); printf("\t\t輸入3---------------------進(jìn)行排序功能\n");printf("*************************************************************************\n"); scanf("%d",&b); switch(b) /* 進(jìn)入函數(shù) */ {case 1:head=creat(head);break; case 2:p=findstudent(head);break; case 3:f=sort(head);break; default:printf("輸入錯(cuò)誤,請(qǐng)從新輸入");}printf("*************************************************************************\n");printf("否進(jìn)行其他功能?\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)); /* 申請(qǐng)新結(jié)點(diǎn) */printf("\n-------------------------------------------------------\n");printf("請(qǐng)依次輸入運(yùn)動(dòng)員的號(hào)碼、姓名、單位、項(xiàng)目(run為1,jump為2,swim為3)、成績(jī)\n學(xué)號(hào)輸入0時(shí),結(jié)束輸入!\n");printf("\n-------------------------------------------------------\n");if(p2!=NULL) printf("請(qǐng)輸入號(hào)碼:");scanf("%ld",&p2->num); /* 輸入結(jié)點(diǎn)
總結(jié)
以上是生活随笔為你收集整理的运动会管理系统php,运动会管理系统源代码.doc的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 提车挂红布是指启动车吗还是挂车?
- 下一篇: 太平久久理财安全吗