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

正文內(nèi)容

圖書館圖書管理軟件系統(tǒng)設(shè)計方案-資料下載頁

2025-05-13 11:39本頁面

【導(dǎo)讀】圖書館圖書管理軟件系統(tǒng)設(shè)計方案

  

【正文】 case 1:printf( BookList\n)。 /*調(diào)用 Create 函數(shù)創(chuàng)建鏈表 */ head=Create()。 system(pause)。 break。 case 2:printf(Display All Books\n)。 Display(head)。 /*調(diào)用 Display 函數(shù)顯示所有 */ system(pause)。 break。 case 3:printf(Insert a Record\n)。 head=Insert_a_record(head)。/*調(diào)用 Insert_a_record函數(shù)插入 */ system(pause)。 break。 case 4:printf(Delete a Book\n)。 head=Delete_a_record(head)。/*調(diào)用 Delete_a_record函數(shù)刪除 */ system(pause)。 break。 case 5:printf(Borrow a Book\nInput Book39。s Name and Sum you borrow:)。 head=Borrow_a_Book(head)。 system(pause)。 break。 case 6:printf(Return a Book\nInput Book39。s Name and Sum you return:)。 head=Return_a_Book(head)。 system(pause)。 break。 case 7:printf(Query\nInput the BookName you want:)。 Query_a_record(head)。/*調(diào)用查詢函數(shù) */ system(pause)。 break。 case 8:printf(Input the name of Text File\n)。 scanf(%s,filename)。/*輸入文件名 */ head=AddfromText(head,filename)。 system(pause)。 break。 case 9:printf(Input the name of the NewText File\n)。 scanf(%s,filename)。/*輸入要寫入的文件名 */ head=WritetoText(head,filename)。 system(pause)。 break。 case 0:printf(Goodbye\n)。 Quit(head)。 exit(0)。 } } return 0。 } int Display_MainMenu() /*顯示菜單的函數(shù) */ { char x。 do{ system(cls)。 printf(************************\n)。 printf( BookList\n)。 printf( All Books\n)。 printf( a Book\n)。 printf( a Book\n)。 printf( a Book\n)。 printf( a Book\n)。 printf(\n)。 printf( Records From a File\n)。 printf( to a File\n)。 printf(\n)。 printf(************************\n)。 printf(Please choose from 09:)。 printf(\n)。 x=getchar()。 }while(x39。039。||x39。939。)。 return(x39。039。)。 } Book *Create() /*創(chuàng)建鏈表的函數(shù),返回首指針 */ { Book *head,*newrecord。 char ch。 head=NULL。/*首指針置空 */ do { printf(Input a Book Name and Number:\n)。 newrecord=(Book *)malloc(LEN)。 /*動態(tài)分配存儲空間 */ scanf(%s%d,newrecordName,amp。newrecordall)。 newrecordleft=newrecordall。 newrecordborrow=0。 head=Insert(head,newrecord)。 /*調(diào)用 Insert 函數(shù)判斷位置插入 */ getchar()。 /*接收最后輸入的回車符 */ printf(Add another Book Y/N?\n)。 ch=getchar()。 getchar()。 /*接收回車符 */ }while(ch==39。Y39。||ch==39。y39。)。 /*判斷是否繼續(xù) */ return(head)。 } Book *Insert(Book *head,Book *s)/*插入結(jié)點(diǎn)的函數(shù) */ { Book *p0,*p1,*p2。 p1=head。p0=s。 if(head==NULL) { head=p0。p0next=NULL。return (head)。 } while(strcmp(p0Name,p1Name)0amp。amp。(p1next!=NULL)) { p2=p1。 p1=p1next。 } if(strcmp(p0Name,p1Name)=0) { p0next=p1。 if(head==p1) head=p0。 else p2next=p0。 } else { p1next=p0。 p0next=NULL。 } return(head)。 } Book *Insert_a_record(Book *head) { Book *newrecord。 newrecord=(Book *)malloc(LEN)。 /*動態(tài)分配存儲空間 */ printf (Please input a record!\n)。 scanf(%s%d,newrecordName,amp。newrecordall)。 newrecordborrow=0。 newrecordleft=newrecordall。 head=Insert(head,newrecord)。 printf(Insert successfully\n)。/*輸出插入成功的信息 */ return(head)。 } Book *Delete(Book *head,char *name) /*刪除功能函數(shù) */ { Book *p1,*p2。 if(head==NULL) printf(Sorry No record!\n)。 p1=head。 while(strcmp(p1Name,name)!=0amp。amp。p1next!=NULL) {p2=p1。p1=p1next。} if(strcmp(p1Name,name)==0) { if(p1==head) head=p1next。 else { p2next=p1next。 printf(delete %s successfully\n,name)。 } } return(head)。 } Book *Delete_a_record(Book *head) { char name[20],ch。 Book *p。 scanf(%s,name)。 getchar()。 p=Query(head,name)。 if(p==NULL) printf(Cannot Find %s\n,name)。 else { printf(Delete %s, Y/N?\n,name)。 ch=getchar()。 system(pause)。 if(ch==39。y39。||ch==39。Y39。) while(p!=NULL) { head=Delete(head,name)。 p=Query(head,name)。 } } return(head)。 } Book *Borrow_a_Book(Book *head) { char name[20],ch。 int n。 Book *p。 scanf(%s%d,name,amp。n)。 getchar()。 p=Query(head,name)。 if(p==NULL) printf(Cannot Find %s\n,name)。 else printf(Are you sure to borrow? %s, Y/N?\n,name)。 ch=getchar()。 if(ch==39。y39。||ch==39。Y39。) head=Borrow(head,name,n)。 return(head)。 } Book *Borrow(Book *head,char *name,int sum) { Book *p1。 p1=head。 while(strcmp(p1Name,name)!=0amp。amp。p1next!=NULL) {p1=p1next。} if (sump1left) printf (Error......\n)。 else { if(strcmp(p1Name,name)==0) p1borrow+=sum。 p1left=p1allsum。 } return(head)。 } Book *Return_a_Book(Book *head) { char name[20],ch。 int n。 Book *p。 scanf(%s%d,name,amp。n)。 getchar()。 /*接收回車 */ p=Query(head,name)。 if(p==NULL) printf(Cannot Find %s\n,name)。 /*找不到結(jié)點(diǎn) */ else printf(Are you sure to return? %s, Y/N?\n,name)。 ch=getchar()。 if(ch==39。y39。||ch==39。Y39。) head=Return(head,name,n)。 return(head)。 } Book *Return(Book *head,char *name,int sum) { Book *p1。 p1=head。 while(strcmp(p1Name,name)!=0amp。amp。p1next!=NULL) /*p1 不是要找的結(jié)點(diǎn),且后面還有結(jié)點(diǎn) */ {p1=p1next。} /*p1 后移一個結(jié)點(diǎn) */ if(strcmp(p1Name,name)==0) /*找到了 */ p1borrow=p1bor
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1