freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

c語言課程設(shè)計--圖書管理-資料下載頁

2025-01-16 02:55本頁面
  

【正文】 /{Bnode *p,*q。Node *t。char memnum[10],booknum[10]。q=b。p=qnext。t=lnext。stringinput(memnum,10,please input the number of member:)。if(strcmp(memnum,0)==0)return。stringinput(booknum,10,please input the number of book:)。while(p!=NULL){if(strcmp(p,booknum)==0amp。amp。strcmp(p,memnum)==0)/*如果書號與會員號都存在則可以還書*/{ qnext=pnext。do{if(strcmp(t,booknum)==0)break。elset=tnext。}while(t!=NULL)。t++。/*如果還書成功則可借的數(shù)目加1*/free(p)。}else{q=p。p=qnext。}}if(p==NULL){printf(input error)。return。}Saveoi(b)。getch()。}main(){Link l。 /*定義鏈表*/Mlink m。Blink b。FILE *fp。 /*文件指針*/int select。 char ch。 int count=0。 Node *p,*r。 Mnode *q,*t。Bnode *s,*k。b=(Bnode*)malloc(sizeof(Bnode))。if(!b) { printf(\n allocate memory failure )。 /*如沒有申請到,打印提示信息*/ return 。 /*返回菜單界面*/ }bnext=NULL。k=b。fp=fopen(f:\\borrow,ab+)。if(fp==NULL){ printf(\n=====can not open file!\n)。 exit(0)。}while(!feof(fp)){s=(Bnode*)malloc(sizeof(Bnode))。if(!s) { printf( memory malloc failure!\n)。 /*沒有申請成功*/ exit(0)。 /*退出*/ }if(fread(s,sizeof(Bnode),1,fp)==1) /*從文件中讀取借書記錄*/{ snext=NULL。 knext=s。 k=s。 }}fclose(fp)。 /*關(guān)閉文件*/m=(Mnode*)malloc(sizeof(Mnode))。if(!m) { printf(\n allocate memory failure )。 /*如沒有申請到,輸出提示信息*/ return 。 /*返回菜單界面*/ }mnext=NULL。t=m。fp=fopen(f:\\member,ab+)。if(fp==NULL){ printf(\n=====can not open file!\n)。 exit(0)。}while(!feof(fp)){q=(Mnode*)malloc(sizeof(Mnode))。if(!q) { printf( memory malloc failure!\n)。 /*沒有申請成功*/ exit(0)。 /*退出*/ }if(fread(q,sizeof(Mnode),1,fp)==1) /*從文件中讀取會員信息記錄*/{ qnext=NULL。 tnext=q。 t=q。 }}fclose(fp)。 /*關(guān)閉文件*/l=(Node*)malloc(sizeof(Node))。if(!l) { printf(\n allocate memory failure )。 /*如沒有申請到,打印提示信息*/ return 。 /*返回菜單界面*/ }lnext=NULL。r=l。fp=fopen(f:\\book,ab+)。if(fp==NULL){ printf(\n=====can not open file!\n)。 exit(0)。}while(!feof(fp)){p=(Node*)malloc(sizeof(Node))。if(!p) { printf( memory malloc failure!\n)。 /*沒有申請成功*/ exit(0)。 /*退出*/ }if(fread(p,sizeof(Node),1,fp)==1) /*從文件中讀取圖書信息記錄*/{ pnext=NULL。 rnext=p。 r=p。 count++。 }}fclose(fp)。printf(\n=====open file sucess,the total records number is : %d.\n,count)。menu()。while(1){ system(cls)。 menu()。 p=r。 printf(\n Please Enter your choice(0~9):)。 /*顯示提示信息*/ scanf(%d,amp。select)。switch(select){case 0:exit(1)。case 1:Add(l)。break。 case 2:Del(l)。break。 case 3:search(l)。break。 case 4:Modify(l)。break。 case 5:Addmember(m)。break。 case 6:borrow(l,m,b)。break。case 7:ret(l,b)。break。case 8:Save(l)。break。 case 9:Savemember(m)。break。 default: Wrong()。getchar()。break。 }}}四、心得經(jīng)過幾天的努力,圖書管理系統(tǒng)總算可以運行了,功能也算基本完善。實習過程中也遇到很多困難,但通過老師和上網(wǎng)查閱資料,總算都一一解決了。最后感謝我的老師和我的室友的支持和大力幫助。
點擊復制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1