藍(lán)芩口服液的功效與作用和蒲地藍(lán)口服液的區(qū)別(藍(lán)芩口服液的功效與作用) js 隨機(jī)數(shù)整數(shù)(js隨機(jī)數(shù)整數(shù)) 湖州火車站附近酒店(湖州火車站) QQ飛車城邦守護(hù)獸怎么進(jìn)化(QQ飛車城邦守護(hù)獸) 韓式盤發(fā)簡單教程(韓式盤發(fā)簡單教程圖解) 地下城assertion failed錯(cuò)誤怎么辦(assertion failed怎么解決) 向量相乘坐標(biāo)公式怎么推算出來的(向量相乘坐標(biāo)公式) 拉丁舞裙服裝怎么畫(拉丁舞裙服裝怎么畫簡筆畫) 裁決之鐮怎么解除(裁決之鐮怎么辦) 10178什么意思(1017代表什么意思) 如何選擇進(jìn)口嬰兒奶粉(如何選擇進(jìn)口嬰兒奶粉牌子) EVIDENT與深圳灣實(shí)驗(yàn)室舉辦首屆EVIDENT Discovery Center生物成像主題研討 合肥歡樂島旅游攻略(合肥歡樂島旅游攻略路線) 侏儒癥的癥狀及病因(侏儒癥的癥狀) 漂白 護(hù)理牙齒如何變白?(漂白牙齒怎么漂白) 波爾多液怎么配制?(波爾多液怎么配制用來防治西瓜枯萎病) tam是什么意思?。═AM是什么意思) 手把手教你如何用百度網(wǎng)盤下載BT種子文件(百度網(wǎng)盤如何使用種子文件下載) 采訪問題怎么寫(采訪問題) 英雄聯(lián)盟如何參與MSI半決賽活動(英雄聯(lián)盟msi比賽賽程) 架立筋圖片示意圖(架立筋圖片) 最右如何添加交友卡(最右怎么看交友卡) 鵝口瘡該如何治療(鵝口瘡該如何治療才能好) 海賊王克比頭像(海賊王克比) 怎么在機(jī)蜜租一輛特斯拉汽車?(如何租特斯拉) IE瀏覽器出錯(cuò)崩潰怎么辦?(電腦提示ie瀏覽器崩潰是什么意思) 情人節(jié)送男朋友禮物嗎(情人節(jié)送男朋友禮物) AutoCAD中制作等高線地形圖(cad中怎么畫等高線地形圖) 第二年車險(xiǎn)計(jì)算方法(第二年車險(xiǎn)計(jì)算方法怎么算) 神雕俠侶后傳第一部(神雕俠侶后傳) 不可不學(xué)的攝影技巧 七:嬰兒攝影技巧(兒童攝影拍攝技巧) 陶瓷密度天平的使用方法及詳細(xì)操作步驟(陶瓷密度天平的使用方法及詳細(xì)操作步驟圖片) 浙江杭州同濟(jì)科技職業(yè)學(xué)院(杭州同濟(jì)科技職業(yè)學(xué)院) 蛋撻的家常做法(葡式蛋撻的家常做法) 標(biāo)準(zhǔn)文獻(xiàn)檢索渠道(國內(nèi)的標(biāo)準(zhǔn)文獻(xiàn)檢索的主要途徑不包括( )) 魔獸世界海加爾山之戰(zhàn)現(xiàn)在的入口在哪?(魔獸世界海加爾山在哪里) 撻伐的意思(撻伐) 網(wǎng)易企業(yè)郵箱客戶端設(shè)置:[1]POP設(shè)置 Win7(網(wǎng)易郵箱pop服務(wù)器設(shè)置) 手機(jī)進(jìn)水怎么處理最好?(手機(jī)進(jìn)水怎么處理最好用) 價(jià)外稅名詞解釋(價(jià)外稅) 爺爺?shù)臓敔數(shù)陌职衷趺唇?爺爺?shù)臓敔數(shù)陌职衷趺唇械? 融商環(huán)球平臺PC端MT5怎么安裝與登錄(融商環(huán)球MT5) 重慶市體彩中心服務(wù)大廳怎么樣(重慶市體彩中心) 怎么做涼拌萵筍絲(怎么做涼拌萵筍絲視頻) 易烊千璽TFBOYS同款手鏈(易烊千璽項(xiàng)鏈同款) 如何去掉磁盤被寫保護(hù)?(怎么去掉磁盤被寫保護(hù)) 圈養(yǎng)羊怎么養(yǎng)#校園分享#(圈養(yǎng)羊怎么養(yǎng)視頻) 制訂和制定有什么區(qū)別呢(制訂和制定有什么區(qū)別) 胃疼怎么辦 胃疼怎樣快速止疼(胃一直疼怎么快速止疼) 動力臂和阻力臂的畫法(動力臂)
您的位置:首頁 >百科精選 >

學(xué)生宿舍管理系統(tǒng)c語言源代碼(你有學(xué)生宿舍管理系統(tǒng)的軟件和源代碼嗎 你需要多少分了)

導(dǎo)讀 關(guān)于學(xué)生宿舍管理系統(tǒng)c語言源代碼,你有學(xué)生宿舍管理系統(tǒng)的軟件和源代碼嗎 你需要多少分了這個(gè)問題很多朋友還不知道,今天小六來為大家解

關(guān)于學(xué)生宿舍管理系統(tǒng)c語言源代碼,你有學(xué)生宿舍管理系統(tǒng)的軟件和源代碼嗎 你需要多少分了這個(gè)問題很多朋友還不知道,今天小六來為大家解答以上的問題,現(xiàn)在讓我們一起來看看吧!

1、/* Note:Your choice is C IDE */#include#include#define LEN sizeof(struct student)int m;struct student { long num; char name[20]; char addr[30]; char xueli[20]; struct student *next; };void main() { int n,w; struct student *head=0; void print(struct student *head); struct student *creat(); struct student *add(struct student *head); struct student *del(struct student *head); struct student *search(struct student *head); system("cls"); do { printf("*******************************************"); printf("*** Student Information Management System***"); printf("********************************************"); printf("**** choose ********************"); printf("**** 1 Enter new data *************"); printf("**** 2 Modify data **************"); printf("**** 3 Search by people .xueli and num ****"); printf("**** 4 Browse data *****************"); printf("**** 5 add data ************"); printf("**** 6 Exit *************"); printf("******************************************"); printf("*******************************************"); printf("choose your number(1-6):[ ]"); do { scanf("%d",&n); if(n>6||n<1) { w=1; printf("Error,please input again(1-6):"); } else w=0; }while(w==1); switch(n) { case 1:head=creat();break; case 2:del(head);break; case 3:search(head);break; case 4:print(head);break; case 5:add(head);break; case 6:exit(0); } }while(n!=6); }struct student *creat() { struct student *head; struct student *p1,*p2; m=0; p1=p2=(struct student *)malloc(LEN); printf("Please input number:"); scanf("%ld",&p1->num); printf("Please input name:"); scanf("%s",p1->name); printf("address:"); scanf("%s",p1->addr); printf("xueli:"); scanf("%s",p1->xueli); while(p1->num!=0) { m=m+1; if(m==1)head=p1; else p2->next=p1; p2=p1; p1=(struct student *)malloc(LEN); printf("number:"); scanf("%ld",&p1->num); printf("name:"); scanf("%s",p1->name); printf("address:"); scanf("%s",p1->addr); printf("xueli:"); scanf("%s",p1->xueli); } p2->next=0; print(head); return(head); }struct student *del(struct student *head) { long num; struct student *p1,*p2; if(head==0) { printf("list null"); exit(0); } p1=head; printf("Which number do you want del:"); scanf("%ld",&num); while(num!=p1->num&&p1->next!=0) { p2=p1; p1=p1->next; } if(num==p1->num) { if(p1==head)head=p1->next; else p2->next=p1->next; printf("delete:%ld",num); m=m-1; } else printf("%ld not been found!",num); print(head); return(head); }struct student * add(struct student * head) { struct student *p0,*p1,*p2; p0=(struct student *)malloc(LEN); printf("number:"); scanf("%ld",&p0->num); printf("name:"); scanf("%s",p0->name); printf("address:"); scanf("%s",p0->addr); printf("xueli:"); scanf("%s",p0->xueli); p1=head; if(head==0) { head=p0; p0->next=0; } else { while((p0->num>p1->num)&&(p1->next!=0)) { p2=p1; p1=p1->next; } if(p0->num<=p1->num) { if(head==p1)head=p0; else p2->next=p0; p0->next=p1; } else { p1->next=p0; p0->next=0; } } m=m+1; print(head); }void print(struct student *head) { struct student *p; printf("Now,There %d records are:",m); p=head; if(head!=0) do { printf("%ld",p->num); printf("%s",p->name); printf("%s",p->addr); printf("%s",p->xueli); p=p->next; }while(p!=0); }struct student *search(struct student *head) { int n,w; struct student *name(struct student *head); struct student *number(struct student *head); struct student *xueli(struct student *head); printf("***** 7 use name to search****"); printf("***** 8 use number to search****"); printf("***** 9 use xueli to search****"); printf("choose your number[ ]"); do { scanf("%d",&n); if(n>9||n<7) { w=1; printf("error,please input again:"); } else w=0; }while(w==1); switch(n) { case 7:name(head);break; case 8:number(head);break; case 9:xueli(head);break; } }struct student *name(struct student *head) { char nam[20]; int w; struct student *p1; printf("Please input name:"); scanf("%s",nam); if(head==0) { printf("list null"); exit(0); } p1=head; while(strcmp(nam,p1->name)!=0&&p1->next!=0) { p1=p1->next; w=0; } if(strcmp(nam,p1->name)==0) { printf("%ld%s%s%s",p1->num,p1->name,p1->addr,p1->xueli); w=1; } if(w==0)printf("%s not been found!",nam); }struct student *number(struct student *head) { long num; int w=0; struct student *p1; printf("please input the number:"); scanf("%ld",&num); if(head==0) { printf("list null!"); exit(0); } p1=head; while(p1->next!=0) { if(num==p1->num) { w=1; printf("%ld%s%s%s",p1->num,p1->name,p1->addr,p1->xueli); } p1=p1->next; } if(w==0)printf("%ld not been found!",num); }struct student *xueli(struct student *head) { struct student *p1; char xue[20]; int w=0; if(head==0) { printf("list null"); exit(0); } printf("please input xueli:"); scanf("%s",xue); p1=head; while(p1->next!=0) { if(strcmp(xue,p1->xueli)==0) { printf("%ld%s%s%s",p1->num,p1->name,p1->addr,p1->xueli); w=1; } p1=p1->next; } if(w==0)printf("%s not been found",xue); }。

本文分享完畢,希望對大家有所幫助。

標(biāo)簽:

免責(zé)聲明:本文由用戶上傳,如有侵權(quán)請聯(lián)系刪除!

最新文章