【正文】
ntf(Search by Name)。 }}void search(){ int y。break。menu()。 switch(y) { case 7 :modify()。 cprintf( Manage Book )。 normvideo()。 gotoxy(25, 2)。 gotoxy(30,13)。 cprintf(Modify Book)。 } }void manage() /* 圖書管理 */{ int y。 getch()。 } fclose(fp)。i++) { if(fwrite(amp。 } else { p1 = head。 gotoxy(10,25)。 cprintf(Please input the lend number of the book:)。 scanf(%d,amp。(temp ))。 getchar()。 gotoxy(2,16)。s publish time:)。(temp ))。 gotoxy(2,12)。s press:)。(temp ))。 gotoxy(2,8)。s name:)。(temp ))。 gotoxy(2,4)。 cprintf(Please input the classfication of chinese library classification:)。 getch()。 flag = 1。 i++) { p1 = p1next。 printf(The number you want to insert behind:)。 clrscr()。}void insert(){ struct linklist* p1,*p2, *head, *temp。 exit(0)。 if((fp = fopen(e:\\,wb)) == NULL) { printf(cannot open )。(p1 binfo),sizeof(bbasic),1,fp) != 1) { clrscr()。 if ((fp = fopen(e:\\,wb)) == NULL) { printf(cannot open )。 } } } if (flag != 1) { printf(cannot find the book.)。 sum 。i sum 。 if(strcmp(find,head ) == 0) { head = head next。 sum = readsum()。 char find[30]。 } clrscr()。 } p = p next。i sum 。 scanf(%s,find)。 if(ky == Key_Y) { p = head。(p ))。 getchar()。 gotoxy(2,20)。 cprintf(Please input the ISBN of the book:)。 scanf(%f,amp。(p ))。 gotoxy(2,14)。s edition:)。(p ))。 gotoxy(2,10)。s writer:)。(p ))。 gotoxy(2,6)。s number:)。(p ))。isum。 clrscr()。 int i,ky,sum。 fclose(fp)。 p2 next = p1。 } for (i = 0。 sum = readsum()。 menu()。linfo,sizeof(linfo),1,fp) != 1) { clrscr()。 gotoxy(10,20)。 gotoxy(2,12)。 gotoxy(2,10)。 cprintf(Please input the borrower39。 cprintf(Please input the pany of the borrower:)。s name:)。 scanf(%s,amp。 } do { clrscr()。 textcolor(WHITE)。}void addborrow() /*增加圖書借閱信息*/{ int ky。 printf(cannot save the data.)。 cprintf(Press N(n) to finish add book or Press any key to add more book.)。 cprintf(Please input the bill number:)。 cprintf(Please input the real money of buy the book:)。 cprintf(Please input the price:)。 cprintf(Please input the number of the book buy:)。s buy time:)。 scanf(%s,amp。)。 gotoxy(2,2)。 clrscr()。 FILE *fp。 fclose(fp)。sum,2,1,fp) != 1) { printf(fail to write the .)。 if ((fp = fopen(e:\\,wb)) == NULL) { printf(cannot save the sum of the book.)。binfo,sizeof(bbasic),1,fp) != 1) { clrscr()。 cprintf(Press N(n) to finish add book or Press any key to add more book.)。 scanf(%d,amp。)。 getchar()。 gotoxy(2,18)。 cprintf(Please input the price:)。 scanf(%s,amp。 getchar()。 cprintf(Please input the book39。 scanf(%s,amp。 getchar()。 cprintf(Please input the book39。 scanf(%s,amp。 getchar()。 cprintf(Please input the book39。 scanf(%s,amp。 if ((fp = fopen(e:\\,ab)) == NULL) { printf(cannot write the )。 clrscr()。 FILE *fp。break。break。 y=choose(7,16)。 textbackground(BLUE)。 cprintf(The Library Managemnt Program)。 cprintf(Back)。 cprintf(Add Purchase info)。 textbackground(RED)。exit(0)。 case 16:sta()。 case 10:manage()。 gotoxy(30,y+3)。 =0x4f。 puttext(i,y,i,y,amp。i=48。 unsigned char attr。 gotoxy(30,y3)。 =0x4f。 puttext(i,y,i,y,amp。i=48。 unsigned char attr。 } } while(ky != Key_ENTER)。 case Key_DOWN: { if (y top) { downbar(y)。 switch(ky) { case Key_UP: { if (y bot) { upbar(y)。 return 。 = 0。 i++) { putchar(0xc4)。 i++) { putchar(0xc4)。 } gotoxy(x, y + high 1)。 i++) { gotoxy(x,y+i)。 gotoxy(width, y + high 3)。 i++) { putchar(0xc4)。 gotoxy(x,y)。 highvideo()。 textbackground(BLUE)。 gotoxy(30,19)。 gotoxy(30,13)。 cprintf(Add Book info)。 box(1,1,24,80)。 /*光標(biāo)*/ play(y)。}void menu(){ int y。void sta()。void orderw(bbasic binfo[100])。void insert()。void manage()。void add()。void box(int,int,int,int)。int key()。借閱期限為一個(gè)月,逾期1天,罰款1角。/**************運(yùn)算可得信息************/ char rtime[15]。 char person[20]。 char bill [30]。 char time[15]。}bbasic。 char ISBN[40]。 char num[20]。 基于各種基本數(shù)據(jù)的統(tǒng)計(jì)計(jì)算?;诟鞣N數(shù)據(jù)的查詢。(5)各種基本數(shù)據(jù)的插入。(3)(2)希望有了這次的經(jīng)歷,你能更好的體會(huì)《軟件工程》這門課的意義,并能學(xué)好和用好其中的知識(shí) 。2) 綜合并結(jié)合現(xiàn)實(shí)應(yīng)用使用C語(yǔ)言的知識(shí)。在做的過程中,你會(huì)發(fā)現(xiàn),提前的規(guī)劃即分析與設(shè)計(jì)重要過編程過程,否則會(huì)走很多彎。這些知識(shí)在學(xué)《軟件工程》這門課時(shí),會(huì)系統(tǒng)講解。如:圖書資料基本信息錄入等。即:允許對(duì)以及錄入的數(shù)據(jù)重新進(jìn)行編輯、修改。如:假設(shè)某本書遺失且館藏?cái)?shù)為0,刪除該書的相關(guān)信息等。 char type[20]。 char edition[20]。 int lendnum。 char writer[20]。 float money。*/typedef struct book3 /*圖書借閱信息結(jié)構(gòu)體*/{/***************需要輸入的信息*********/ char name[20]。 /*借書證號(hào)*/ char btime[15]。/*圖書借閱信息:借閱人、借閱人所在單位、借書證號(hào)、所借書名、借閱日期、歸還日期、逾期罰款等。}。void words()。int readsum()。void addborrow()。void delete()。void searchwriter()。int halfw(int sum,bbasic binfo[100],char *find)。int main(void){ menu()。 /*顯示菜單文字*/ y = choose(7,19)。 clrscr()。 textbackground(RED)。 cprintf(Manage Book)。 cprintf(Book Statistic)。 textcolor(LIGHTGRAY)。 textcolor(RED)。}void box(int x,int y, int high, int width) /*畫方框*/{ int i。 i width 1。 putchar(0xc0)。 i high 1。 putchar(0xb3)。 i width 1。 i width 1。}int key() /*讀鍵盤*/{ union REGS rg。rg)。 do { ky = key()。break。break。