运动会管理系统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); /* 輸入結點
總結
以上是生活随笔為你收集整理的运动会管理系统php,运动会管理系统源代码.doc的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 提车挂红布是指启动车吗还是挂车?
- 下一篇: php clownfish,Python