九九热最新网址,777奇米四色米奇影院在线播放,国产精品18久久久久久久久久,中文有码视频,亚洲一区在线免费观看,国产91精品在线,婷婷丁香六月天

歡迎來到裝配圖網(wǎng)! | 幫助中心 裝配圖網(wǎng)zhuangpeitu.com!
裝配圖網(wǎng)
ImageVerifierCode 換一換
首頁 裝配圖網(wǎng) > 資源分類 > DOC文檔下載  

圖書館管理系統(tǒng) 數(shù)據(jù)結(jié)構(gòu)大作業(yè)

  • 資源ID:43808986       資源大小:141.50KB        全文頁數(shù):30頁
  • 資源格式: DOC        下載積分:20積分
快捷下載 游客一鍵下載
會(huì)員登錄下載
微信登錄下載
三方登錄下載: 微信開放平臺登錄 支付寶登錄   QQ登錄   微博登錄  
二維碼
微信掃一掃登錄
下載資源需要20積分
郵箱/手機(jī):
溫馨提示:
用戶名和密碼都是您填寫的郵箱或者手機(jī)號,方便查詢和重復(fù)下載(系統(tǒng)自動(dòng)生成)
支付方式: 支付寶    微信支付   
驗(yàn)證碼:   換一換

 
賬號:
密碼:
驗(yàn)證碼:   換一換
  忘記密碼?
    
友情提示
2、PDF文件下載后,可能會(huì)被瀏覽器默認(rèn)打開,此種情況可以點(diǎn)擊瀏覽器菜單,保存網(wǎng)頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無水印,預(yù)覽文檔經(jīng)過壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標(biāo)題沒有明確說明有答案則都視為沒有答案,請知曉。

圖書館管理系統(tǒng) 數(shù)據(jù)結(jié)構(gòu)大作業(yè)

封面數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì)報(bào)告圖書管理信息系統(tǒng)二一三年十二月本程序是圖書管理信息系統(tǒng)的實(shí)現(xiàn),具體功能包括讀者注冊、登錄、新書增添、圖書查詢、圖書搜索、借還書、讀存盤等。程序流程如下:圖書管理信息系統(tǒng)注冊登陸讀者注冊管理員注冊讀者登錄管理員登錄入庫退出系統(tǒng)個(gè)人信息查詢還書借書任務(wù)分析:1新書入庫:新到書籍入庫包含幾方面的操作:首先查詢該書名的書籍在圖書館信息中是否已經(jīng)存在,若存在,則增加可借數(shù)量和總庫存量,若不存在,則新增加概述信息,從界面輸入書籍的編號(0999999的長整型)、書名(字符串類型)、作者名(字符串類型)、出版社信息(字符串類型)、出版日期(整型)、該書的現(xiàn)存量(整型)、該書的總量(整型)。輸入該信息之后,將該節(jié)點(diǎn)插入到書籍信息鏈表中去。該節(jié)點(diǎn)的插入位置根據(jù)查找,找到合適的位置插入,這樣可以保證整個(gè)數(shù)據(jù)都是有序的,方便查找。2讀者注冊:沒有賬號和密碼讀者和管理員都不能登錄系統(tǒng),系統(tǒng)默認(rèn)第一個(gè)注冊系統(tǒng)的是系統(tǒng)管理員,借閱號為1000,權(quán)限是1,并輸入密碼000000及基本信息,并將所借書信息區(qū)全部置零.不是第一個(gè)注冊的讀者,借閱號從1000往后順延,自己設(shè)置密碼,權(quán)限為0,其余信息與管理員相同,因此登陸之后,管理員可以看到“入庫”菜單選項(xiàng),普通讀者不能看到該選項(xiàng)。3借書:書籍借閱主要涉及存書庫和讀者信息庫的更新。用戶首先登陸系統(tǒng),通過3種查詢方式查詢該書是否存在,并判斷該書的剩余數(shù)量是否大于零,最后查詢該讀者是否已經(jīng)借滿書籍。若以上條件都滿足,則將該書編號存入該讀者的借閱信息區(qū),將該讀者的可借書數(shù)量減1,該存書的可借數(shù)量減1。4還書:讀者登錄后按書名號來歸還所借書籍,若書名號正確并且確認(rèn)歸還該書籍,則從讀者的借書區(qū)刪除該書籍,讀者的可借書數(shù)量加1,將該書的可借數(shù)量增加1,然后返回.5信息查詢:信息查詢分為讀者信息查詢和書籍信息查詢,讀者信息查詢是在讀者登錄之后,可以顯示本人的基本信息以及借書狀況(所借書的本數(shù)、可借書本數(shù)以及所借書的信息),還可查詢書籍信息,可根據(jù)書籍的編號來查找書籍、根據(jù)書名來查找書籍、根據(jù)作者名來查詢書籍。查詢到該書籍后顯示是否借閱該書籍。算法設(shè)計(jì):1、 查找查找分按書名查找、按作者查找和按書號查找。按書名查找是采用遍歷線性鏈表的方式,從首元結(jié)點(diǎn)開始向下遍歷,檢查輸入的書名和已存的書名是否匹配,如果匹配,則將該書籍的指針返回,然后查找結(jié)束.若直到最后也沒找到,則返回空。按作者查找則根據(jù)輸入的作者名,從書籍鏈表的首元結(jié)點(diǎn)開始遍歷,檢查記錄中的讀者信息和輸入的是否匹配,若找到匹配的,則輸出該書籍信息,然后繼續(xù)向下遍歷,直到鏈表尾部,查找結(jié)束。按書號查找則是根據(jù)建立的索引表來查找記錄。2、 讀者信息存儲(chǔ)讀者信息采用線性單鏈表存儲(chǔ),設(shè)置頭結(jié)點(diǎn),頭結(jié)點(diǎn)不存儲(chǔ)數(shù)據(jù),初始化時(shí)頭結(jié)點(diǎn)next設(shè)置為空,然后每從文件中讀取一組數(shù)據(jù),則將該數(shù)據(jù)存入新開辟的空間,鏈接到讀者信息鏈表中,再將該數(shù)據(jù)的next置空。3、圖書信息存儲(chǔ)書籍信息存儲(chǔ)采用單鏈表存儲(chǔ),設(shè)置頭結(jié)點(diǎn),頭結(jié)點(diǎn)不存儲(chǔ)數(shù)據(jù),頭結(jié)點(diǎn)的next為空,初始化時(shí),從文件中讀取一個(gè)格式化的數(shù)據(jù),則將該數(shù)據(jù)存入新開辟的空間,并將該節(jié)點(diǎn)鏈接到鏈表中去,將next置空。程序主要函數(shù):1. 增加圖書:void insert(bookbhead);輸入書號,判斷是否合法,然后輸入圖書信息。流程圖如下進(jìn)入輸入書號N書號合法輸入書籍信息YY結(jié)束輸入N繼續(xù)輸入2. 借書:void borrow(reader *temp,book*Bhead);通過書號、書名、作者三種查找方式查詢借書,借書成功后,該書的可借書量減1,讀者借書量減1。流程圖如下:N進(jìn)入查找按書名查找按書號查找按作者查找進(jìn)入輸入書名繼續(xù)借書退出輸入書號輸入作者未找到找到借書找到借書成功YNYYN3. 還書:void returnbook(book*bhead,reader *temp);輸入書號,查詢是否存在,然后還書,該書的可借書量加1,讀者借書量加1。流程圖如下:進(jìn)入還書輸入書號存在還書還書成功退出YNYN詳細(xì)程序模塊1、頭文件定義頭文件library.h定義了3個(gè)結(jié)構(gòu)體:書籍結(jié)構(gòu)體、讀者結(jié)構(gòu)體和索引表結(jié)構(gòu)體,書籍結(jié)構(gòu)體的定義如下:typedefstruct READERlong number;/借閱號char name15;/讀者姓名char sex;/讀者性別char password16;/讀者的密碼int residue;/讀者的剩余可借書籍?dāng)?shù)量long borrowed10;/讀者已經(jīng)借閱的書籍編號int limit;/讀者權(quán)限struct READER *next; reader;讀者結(jié)構(gòu)體的定義如下:typedefstruct BOOKlong number;/書籍編號char name30;/書名char author30;/作者char press30;/出版社信息long presstime;/出版日期int exist;/在庫數(shù)量int total;/總數(shù)量struct BOOK next; book;索引表結(jié)構(gòu)體的定義如下:typedefstruct KEY long key;book adress;struct KEY next;keynode;頭文件還包含一些系統(tǒng)頭文件的聲明:#include”stdio。h”include"string.h"#include”conio.h”include”windows.h”還有一些函數(shù)的聲明,用#ifndef、#endif來包含,以免重復(fù)包含。2、插入模塊插入模塊分為書籍入庫、注冊、登陸3大塊,分3個(gè)函數(shù),聲明如下:void insert(book*bhead);/入庫void reg(readerhead);/注冊reader login(reader*rhead,book*bhead);/登陸這3個(gè)函數(shù)分別實(shí)現(xiàn)新書入庫、讀者注冊、登陸等功能,入庫功能只有管理員才能調(diào)用,其余函數(shù)均可以調(diào)用。3、讀寫模塊此模塊主要實(shí)現(xiàn)向文件寫入、讀取數(shù),主要是2個(gè)文件:reader.txt、book。txt,分為4個(gè)函數(shù):讀者讀寫函數(shù),書籍讀寫函數(shù)。定義如下:book* Bload();/書籍鏈表讀取readerRload();/讀者鏈表讀入void Bsave(bookBhead);/書籍鏈表寫入void Rsave(readerRhead,book*bhead);/讀者鏈表寫入讀者和書籍鏈表的初始化就由讀取函數(shù)完成,若文件為空則返回空指針,若不為空,則將文件里面的信息寫入到鏈表中,每讀出一個(gè)數(shù)據(jù),分配一個(gè)空間,將該信息輸入.4、查找模塊查找模塊分書籍查找模塊、讀者查找模塊,書籍查找模塊分線性鏈表查詢、遍歷查詢、索引表查詢,讀者查詢直接遍歷讀者鏈表,查找該讀者,若存在,返回指針,不存在則返回NULL。查找模塊的定義如下:bookS_name(bookhead,char name);/按書籍名查找函數(shù)void S_author(bookhead);/按作者查找keynodeinitindex(bookhead);/初始化建立索引表book*S_number(long num,book*bhead);/按書號查找readerS_reader(reader*rhead,longnum);/查找讀者5、顯示模塊根據(jù)給出的節(jié)點(diǎn)指針,顯示該節(jié)點(diǎn)所包含的信息,顯示分為讀者顯示和書籍信息顯示,讀者信息顯示包含書籍信息顯示,以便顯示讀者所借書的信息。這兩個(gè)函數(shù)的聲明如下:void showR(readertr,bookbhead);/顯示讀者信息函數(shù)void showB(bookp);/顯示書籍信息函數(shù)這個(gè)模塊還有2個(gè)小函數(shù),用于將存入的性別F、M轉(zhuǎn)化成漢字,將存的權(quán)限“1”、“0”轉(zhuǎn)化成“管理員”、“讀者”輸出,這兩個(gè)函數(shù)的定義如下:char*sc(char p)if(p=F|p=f)return ”女”;elsereturn ”男”;char*lc(int i)if(i=1)return ”管理員"elsereturn "讀者”;程序運(yùn)行結(jié)果1.登錄界面:2。入庫界面:3.借書界面:4.還書界面:5.個(gè)人信息查詢界面:體會(huì)這次的大作業(yè)讓我復(fù)習(xí)并實(shí)際運(yùn)用本學(xué)期學(xué)的數(shù)據(jù)結(jié)構(gòu)的有關(guān)知識,例如數(shù)據(jù)的存儲(chǔ)、排序、調(diào)用、查找等,加深了對數(shù)據(jù)結(jié)構(gòu)和C語言的理解,總的來說,收獲頗豐。代碼頭文件library。h#ifndef LIBRARY_INCLUDE#define LIBRARY_INCLUDEincludestdio。hincludestring。hinclude<conio.hinclude<stdlib。h#includewindows。h>include<time。htypedefstruct BOOKlong number;char name30;char author30;char press30;longpresstime;int exist;int total;struct BOOK next;book;typedefstruct KEYlong key;book *adress;struct KEY *next;keynode;typedefstruct READERlong number;char name15;char sex;char password16;int residue;long borrowed102;int limit;struct READER next;reader;char lc(int i);char *sc(char p);voidshowR(reader tr,book bhead);voidshowB(book p);book *S_name(book head,char name);voidS_author(book head);keynode *initindex(book *head);voiddelkey(keynode keyhead);book S_number(long num,book bhead);reader *S_reader(reader *rhead,longnum);book Bload();reader Rload();voidBsave(book *Bhead);voidRsave(reader *Rhead,book *bhead);void insert(book *bhead);voidreg(reader *head);reader login(reader *rhead,book bhead);void borrow(reader *temp,book Bhead);voidreturnbook(book *bhead,reader *temp);void style();voidintpsd(char *psd);void menu(struct BOOK *Bhead,reader Rhead);void menu2(reader *temp,reader *rhead,book *bhead);longbacktime();endif借還書文件borrow_return.cppinclude"library.h”void borrow(reader *temp,book *Bhead)style();longnum;int i;chart,k,name30;book *Bbook;getch();system("cls");while(1)printf("n ”);printf(”n借書”);printf(”n ");printf(”n請輸入您要查找借閱書籍的方式:”);printf("n 1、按書號查找n");printf(”n 2、按作者查找n");printf(”n 3、按書名查找n");printf("n 4、返回主菜單n");t=getch();switch(t)case 1:printf("n請輸入您要查找的書籍編號:”);scanf("%d",num);if(Bbook=S_number(num,Bhead))!=NULL)showB(Bbook);printf(”n請問你是否要借閱該書籍?Y/N");k=getch();if(k=Y|k=y)goto borrow;elsebreak;elsebreak;case 2:S_author(Bhead);break;case 3:printf("n請輸如您要查找的書籍名:");scanf(”%s”,name);if(Bbook=S_name(Bhead,name)!=NULL)showB(Bbook);printf(”n請問你是否要借閱該書籍?Y/N”);k=getch();if(k=Y|k=y)goto borrow;elsebreak;elsecontinue;break;default:return;borrow:if(Bbook!=NULLtempresidue0Bbook>exist>0)temp->residue-;Bbookexist;for(i=0;i10;i+)if(temp->borrowedi0=0)temp->borrowedi0=Bbook-number;temp-borrowedi1=backtime();break;printf(”n 借閱成功!”);elseif(!(tempresidue>0))printf("n您只能借閱10本書籍!");elseif(!(Bbookexist0))printf(”n該書沒有庫存,請借閱其他書籍!”);printf(”n您要繼續(xù)借閱書籍嗎?Y/N”);t=getch();if(t=y|t=Y)continue;elsebreak;voidreturnbook(book *bhead,reader *temp)longnum;inti,j=0;char t;book p;printf("n ");printf(”n還書");printf("n ”);printf(”nn請輸入您所還書的編號:”);scanf("d",num);for(i=0;i<10;i+)if(num=temp->borrowedi0)j=1;p=S_number(num,bhead);if(p!=NULLj=1)printf("n”);printf("n書本編號書籍名稱出版社名稱出版時(shí)間作者”);printf("n");printf("n8d%12s14s8d%14s",pnumber,pname,p-press,ppresstime,pauthor);printf("nn");printf("n確認(rèn)歸還該書籍?Y/N");t=getch();if(t=Y|t=y)p-exist+;temp-residue+;for(i=0;i10;i+)if(temp->borrowedi0=num)temp->borrowedi0=0;temp->borrowedi1=0;break;else return;elseprintf(”n編號有誤,請仔細(xì)檢查!");新書入庫insert.cpp#include ”library.h”void insert(book *bhead)style();long t;book *temp1,*temp,*temp2;temp1=bhead-next;printf(”n ");printf("n入庫");printf(”n ”);while(1)printf("n請輸入您給定書的編號(6位以內(nèi)的正整數(shù)):");scanf(”d",&t);if(t=0|t999999)printf(”n您的編號不在處理范圍(1999999)之內(nèi)!”);fflush(stdin);continue;elsetemp2=S_number(t,bhead);if(temp2=NULL)break;elsetemp2>total+;temp2>exist+;printf(”n編號為d的書已存在,入庫成功!”,t);return;temp=(book)malloc(sizeof(book));temp->number=t;printf(”n請輸入書名:");scanf("s”,temp-name);printf("n請輸入本書作者:");scanf("s",temp>author);printf(”n請輸入本書出版社:”);scanf(”%s”,temp-press);printf("n請輸入本書出版時(shí)間:”);scanf(”d”,temp->presstime);temp>next=NULL;temp->total=1;temp>exist=1;if(bhead->next=NULL)bhead->next=temp;elsewhile(temp1>next!=NULL&temp1-numbertemp->number)temp1=temp1-next;tempnext=temp1->next;temp1->next=temp;printf(”n ");printf(”n入庫成功");printf("n ");voidreg(reader *head)style();long i=1000;int j;char t116,t216;reader *temp=head>next;reader *p;p=new(reader);printf("n ”);printf(”n注冊”);printf(”n ");printf("n 請輸入姓名:”);scanf(”s",pname);fflush(stdin);while(1)printf("n 請輸入性別:n M:男性:n F:女性:”);p-sex=getchar();if(p>sex=F|psex=f|p>sex=Mp-sex=m)break;elseprintf("n 閣下既非男,又非女,莫非來自泰國?”);while(1)while(1)printf("n 請輸入您的密碼:”);intpsd(t1);if(strlen(t1)=4)printf(”n 您設(shè)置的密碼過于簡單,請重新設(shè)置:");elsebreak;printf("n 請確認(rèn)您的密碼:”);intpsd(t2);if(strcmp(t1,t2)=0)strcpy(p->password,t1);break;elseprintf(”n 您兩次輸入的密碼不一致!");presidue=10;p-next=NULL;for(j=0;j<10;j+)p->borrowedj0=0;pborrowedj1=0;if(temp=NULL)pnumber=i;head->next=p;p-limit=1;else+i;while(temp-next!=NULL)+i;temp=temp-next;p-number=i;p>limit=0;tempnext=p;showR(p,NULL);reader *login(reader rhead,book *bhead)longnum;char pass16;int i=5;reader reader;style();printf(”n ”);printf("n登錄");printf(”n ”);while(1)printf(”n 請輸入您的借閱證號:");scanf("d”,num);if(reader=S_reader(rhead,num))=NULL)printf(”n 沒有找到您所在編號的讀者?!保?getch();return NULL;elsebreak;while(i>0)printf(”n 請輸入密碼:”);intpsd(pass);if(strcmp(pass,readerpassword)=0)return reader;elseprintf(”n 密碼錯(cuò)誤");return NULL;文件讀、寫load_save。cppinclude "library.h"book Bload()FILE *p;book *Bhead=(book*)malloc(sizeof(book);book temp,temp1;Bhead->next=NULL;if(p=fopen("book.txt",”r”))=NULL)printf(”n打開文件book.txt失敗,請檢查.。.");returnBhead;elsefgetc(p);if(!feof(p))printf("n非空");rewind(p);temp=(book)malloc(sizeof(book);fscanf(p,”14d12s%18s8d14s4d4dn",temp->number,temp-name,temp>press,&temp>presstime,temp>author,temp-total,temp->exist);temp>next=NULL;Bhead-next=temp;while(!feof(p)temp1=(book*)malloc(sizeof(book));fscanf(p,"%14d%12s18s8d%14s%4d4dn",temp1>number,temp1name,temp1->press,temp1presstime,temp1-author,temp1->total,temp1exist);temp1next=NULL;tempnext=temp1;temp=tempnext;printf(”n書籍信息讀取成功。.");returnBhead;reader Rload()FILE *p;int i;reader *temp,*temp1;reader *Rhead=(reader)malloc(sizeof(reader);Rhead-next=NULL;if((p=fopen(”reader。txt”,"r"))=NULL)printf(”n打開文件reader.txt失敗,請檢查”);returnRhead;elsefgetc(p);if(!feof(p))rewind(p);temp=(reader*)malloc(sizeof(reader));fscanf(p,"%12d%10s%3c%8d2d12s”,temp>number,tempname,&temp-sex,&temp>residue,temp-limit,temp-password);for(i=0;i10;i+)fscanf(p,"%6d”,temp->borrowedi0);fscanf(p,"%10d”,&tempborrowedi1);tempnext=NULL;Rhead-next=temp;while(!feof(p)printf("a");temp1=(reader*)malloc(sizeof(reader));fread(temp1,sizeof(reader),1,p);temp1-next=NULL;temp>next=temp1;temp=temp-next;printf("n讀者信息讀取成功。.”);returnRhead;voidBsave(book *Bhead)FILE p;book *temp=Bhead->next;if(temp=NULL)return;elseif(p=fopen(”book.txt","w”))=NULL)printf("n打開book。txt失敗.”);while(temp!=NULL)showB(temp);fprintf(p,”%14d%12s14s%8d14s4d%4dn",temp>number,temp-name,temp->press,temp>presstime,tempauthor,temp>total,tempexist);temp=tempnext;printf(”n存儲(chǔ)書籍成功.");voidRsave(reader Rhead,book Bhead)FILE p;int i;reader temp=Rhead-next;if(temp=NULL)return;elseif((p=fopen("reader.txt",”w"))=NULL)printf(”n打開reader。txt失敗.?!?;while(temp!=NULL)Sleep(1000);showR(temp,Bhead);fprintf(p,”12d10s%3c8d%2d%12s”,temp>number,temp->name,temp>sex,temp>residue,templimit,temp>password);for(i=0;i<10;i+)fprintf(p,”6d",temp>borrowedi0);fprintf(p,"%10d”,temp>borrowedi1);temp=tempnext;printf("n存儲(chǔ)讀者成功。.。");圖書搜索search.cpp#include”library。h”book *S_name(book *head,char name)book temp=head->next;if(temp=NULL)printf("n書庫中還沒有書籍,請入庫!”);elsewhile(temp!=NULL)if(strcmp(temp->name,name)=0)printf(”n書名為<<%s的書存在!”,name);break;elsetemp=temp-next;return temp;voidS_author(book *head)char author30;book temp=head>next;if(temp=NULL)printf(”n書庫中還沒有書籍,請入庫!”);elseprintf("n請輸入您要查找的作者名:”);scanf(”s”,author);while(temp!=NULL)if(strcmp(author,temp>author)=0)showB(temp);temp=temp->next;getch();keynode *initindex(book head)int i;book temp=head->next;keynode *tempkey,p;printf("n初始化索引表開始?!?;keynode *keyhead=(keynode*)malloc(sizeof(keynode);keyhead>next=NULL;tempkey=keyheadnext;if(temp!=NULL)p=(keynode*)malloc(sizeof(keynode);p-key=temp>number;padress=temp;p-next=NULL;keyheadnext=p;tempkey=keyhead->next;while(temp!=NULL)for(i=0;i5&temp>next!=NULL;i+)temp=tempnext;if(i<4)returnkeyhead;elsep=(keynode*)malloc(sizeof(keynode));pkey=tempnumber;padress=temp;pnext=NULL;tempkey->next=p;tempkey=tempkey->next;getch();returnkeyhead;voiddelkey(keynode *keyhead)keynode temp;if(keyhead->next=NULL)free(keyhead);elsewhile(keyhead!=NULL)temp=keyhead;keyhead=keyheadnext;free(temp);printf("n索引表清空!”);book S_number(long num,book bhead)int i;book *p;keynode keyhead=initindex(bhead);keynode *tempkey=keyhead-next;if(tempkey=NULL)printf(”n書庫無記錄,請輸入!");delkey(keyhead);return NULL;elsewhile(tempkey->next!=NULL)if(tempkeykey<num&&tempkey-next>key<num)tempkey=tempkey>next;else break;if(tempkey=NULL)printf("沒有找到編號為d的書籍!",num);delkey(keyhead);return NULL;elsep=tempkeyadress;for(i=0;i<5&p!=NULL;i+)if(pnumber=num)showB(p);delkey(keyhead);return p;elsep=p>next;delkey(keyhead);return NULL;reader S_reader(reader rhead,longnum)reader *temp=rheadnext;if(temp=NULL)printf("n文件中沒有數(shù)據(jù)導(dǎo)入,請檢查修復(fù)系統(tǒng)!”);return NULL;elsewhile(temp)if(temp>number=num)return temp;elsetemp=temp>next;return temp;顯示圖書及讀者信息showing.cpp#include"library.h"voidshowR(reader *tr,book bhead)int i;book p;printf("n ");printf(”n讀者信息”);printf("n");printf("n");printf("n借閱證號姓名性別剩余可借已借本數(shù)權(quán)限");printf("n");printf(”n12d10s6s8d%8d%6s",tr->number,tr>name,sc(trsex),tr-residue,10-tr->residue,lc(tr-limit));printf("n");printf("n 以下為所借書籍信息:n");for(i=0;i<10;i+)if(tr-borrowedi0=0)continue;elseprintf(”n %d”,tr->borrowedi0);p=S_number(tr->borrowedi0,bhead);printf("n”);printf("n書本編號書籍名稱出版社名稱出版時(shí)間作者借書日期可借時(shí)間");printf(”n");printf(”n8d12s%14s8d%14s%8d 2個(gè)月”,pnumber,p>name,ppress,p-presstime,p->author,tr->borrowedi1);printf("nn”);voidshowB(book *p)printf(”n");printf("n書本編號書籍名稱出版社名稱出版時(shí)間作者共計(jì)可借");printf("n”);printf(”n%8d%12s%14s%8d14s4d4d”,p->number,p>name,p>press,ppresstime,p-author,p>total,p-exist);printf("nn");char *sc(char p)if(p=F|p=f)return "女"elsereturn "男"char lc(int i)if(i=1)return "管理員";elsereturn ”讀者”;菜單menu。cpp#include "library.h”void style()system("mode con cols=90 lines=30");system(”color 0f");system("cls");voidintpsd(char psd)int i=0; char c;while((c=getch())!=13)if (c!=b&&c!=t&i20)psdi=c;putchar(*);i+;if(c=b&i0)printf("b b");i; psdi=0;return;void menu(book *Bhead,reader *Rhead)reader tempr;style();charm;int i;while(1)printf("nt ");printf("nt長安大學(xué)圖書館”);printf(”nt”);printf("nt”);printf("nt");printf(”nt");printf("nt 1登陸");printf("nt");printf("nt 2注冊”);printf(”nt");printf(”nt”);printf(”nt");printf(”nt按任意鍵退出”);printf("ntn”);fflush(stdin);m=getch();if(m=2)char message = "n正在進(jìn)入請稍候. "for(i=0;istrlen(message);i+)printf(”c”,messagei);Sleep(50);system(”cls”);reg(Rhead);elseif(m=1)char message = "n正在進(jìn)入請稍候.。 ";for(i=0;i<strlen(message);i+)printf(”c”,messagei);Sleep(50);system(”cls”);tempr=login(Rhead,Bhead);if(tempr=NULL) continue;menu2(tempr,Rhead,Bhead);elsesystem("cls”);Rsave(Rhead,Bhead);Bsave(Bhead);exit(0);void menu2(reader temp,reader *rhead,book bhead)style();char i;getch();system(”cls");while(1)printf("n ");printf(”n圖書館菜單");printf(”n”);printf("n");printf("n請選擇您的操作: ”);printf(”n");printf(”n 1借書”);printf("n 2還書”);printf("n 3個(gè)人信息");printf(”n 4返回上級");printf(”n 5退出系統(tǒng)");if(temp>limit=1) printf(”n 6入庫”);else ;printf("n”);printf("n

注意事項(xiàng)

本文(圖書館管理系統(tǒng) 數(shù)據(jù)結(jié)構(gòu)大作業(yè))為本站會(huì)員(p***)主動(dòng)上傳,裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對上載內(nèi)容本身不做任何修改或編輯。 若此文所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng)(點(diǎn)擊聯(lián)系客服),我們立即給予刪除!

溫馨提示:如果因?yàn)榫W(wǎng)速或其他原因下載失敗請重新下載,重復(fù)下載不扣分。




關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!