图书信息管理系统代码Word格式文档下载.docx
- 文档编号:22456113
- 上传时间:2023-02-04
- 格式:DOCX
- 页数:13
- 大小:15.99KB
图书信息管理系统代码Word格式文档下载.docx
《图书信息管理系统代码Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《图书信息管理系统代码Word格式文档下载.docx(13页珍藏版)》请在冰豆网上搜索。
Prince"
1999-9"
18.00},
222222"
Physics"
2000-4"
333333"
Biology"
D"
2004-2"
{"
444444"
WhiteSnow"
Old"
1998-7"
14.00},
555555"
Lion"
2001-2"
17.00},
666666"
English"
--"
1864-2"
777777"
TheWoods"
2001-3"
22.00},
888888"
KuangRenRiJi"
LuXun"
1948-2"
23.00}};
/*---------****************menu()****************--------*/
voidmenu()
intflag=1;
intchoose;
voidadd();
voiddele();
voidmodify();
voidbooknumberlookup();
voidbooknamelookup();
voidwritterlookup();
printf("
\n\n\n\n"
);
┏---------------------------------MENU--------------------------------┓\n"
││\n"
│1.AddMoreBooks│\n"
│2.DeleteTheBooks│\n"
│3、EditBookInformation│\n"
│4、SearchasID│\n"
│5、SearchAsTitle│\n"
│6、SearchAsAuthor│\n"
│0、Exit│\n"
┗-------------------------------WelcomeToUse------------------------------┛\n\n\n\n\n\n"
PleaseChoose(0-6):
"
scanf("
%d"
&
choose);
if(choose<
1||choose>
6)
choose=0;
switch(choose)
{
case1:
add();
break;
case2:
dele();
case3:
modify();
case4:
booknumberlookup();
case5:
booknamelookup();
case6:
writterlookup();
case0:
\n\n\n"
TTTTTTTHHHHHHANNNKKK\n"
TTTHHAANNNKK\n"
THHAANNNKK\n"
THHHHHHAAAAANNNKKK\n"
THHAAANNNKK\n"
TTTHHHHHHAAAANNNKKKK\n"
\n"
YYYYOOOOUU\n"
YYOOUU\n"
YYYOOUU\n"
YOOUU\n"
YYYOOOOUUUU\n"
break;
}
/*---------****************add()****************---------*/
voidadd()
voidsystem();
inti,flag=1;
chark;
printf("
\n\n\n\n\n\n\t\t\tWelcomeToAdding-BooksSystem!
\n\n\n\n\n\n\n\n"
while(flag)
{
printf("
\n\nPleaseEnterBookInformation:
getchar();
\tID:
getchar();
gets(book[M].book_number);
Title:
gets(book[M].book_name);
Author:
gets(book[M].writter);
PublishTime:
scanf("
%s"
book[M].pubnish_time);
Price:
%f"
book[M].price);
M++;
ID\tTitle\t\tAuthor\tPublishTime\t\tPrice\n"
for(i=0;
i<
M;
i++)
%-10s%-20s%-15s%-10s\t\t%f\n"
book[i].book_number,
book[i].book_name,book[i].writter,
book[i].pubnish_time,book[i].price);
AddMore(Y/N)?
\t:
%c"
k);
if(k=='
n'
||k=='
N'
)
flag=0;
}
menu();
/*---------****************dele()****************---------*/
voiddele()
inti,j,flag=1;
charnum[10],c;
\n\n\t\t\tWelcomeToBook-Deletingsysytem!
\n\nPleaseentertheID:
num);
for(i=0;
if(strcmp(book[i].book_number,num)==0)
for(j=i;
j<
j++)
book[j]=book[j+1];
printf("
Deleted!
M--;
break;
}
if(i==M)
WrongEnter!
ContinueOrExit(Y/N)?
:
getchar();
c);
if(c=='
||c=='
flag=0;
menu();
/*---------****************modify()****************---------*/
voidmodify()
{voidsystem();
inti,k,flag=1,choose;
charnum[10],m;
\n\n\t\t\tWelcomeToBook-EditingSystem!
PleaseEnterID:
gets(num);
k=0;
\n\nPriciousInformation:
book[i].book_number,book[i].book_name,book[i].writter,book[i].pubnish_time,book[i].price);
\n1、EditTitle\n2、EditAuthor\n3、EditPublishTime\n4、EnditPrice\n5、EditAll\n"
Choose(1-5):
switch(choose)
{
case1:
gets(book[i].book_name);
gets(book[i].writter);
case3:
gets(book[i].pubnish_time);
case4:
book[i].price);
case5:
出版时间:
gets(book[i].pubnish_time);
}
k=1;
InformationAfterEditing:
book[i].book_number,
book[i].book_name,book[i].writter,book[i].pubnish_time,book[i].price);
if(k==0)
ErrorEnter!
ConinueOrExit(Y/N)?
m);
if(m=='
||m=='
/*---------****************booknumberlookup()****************---------*/
voidbooknumberlookup()
inti,k,flag=1;
charnum[10];
charm;
\n\n\t\t\tSearchAsID\n"
PleaseEnterTheID:
elseprintf("
/*---------***************booknumberlookup()****************---------*/
voidbooknamelookup()
\n\n\t\t\tSearchAsTitle\n"
PleaseEnterTitle:
if(strcmp(book[i].book_name,num)==0)
/*---------****************writterlookup()****************---------*/
voidwritterlookup()
\n\n\t\t\tSearchAsAuthor\n"
PleaseEnterTheAuthor:
if(strcmp(book[i].writter,num)==0)
/*-----**********************main()********************-----*/
voidmain()
longinta;
inti,k;
\n\n\n\t***********************welcometothesystem!
*******************\n\n\n\n"
##################\n"
#####################################\n"
################\n"
##########################\n"
##############\n"
####################################\n"
######\n"
WELCOMETO..................#####\n"
........USETHELIBRARYSYSTEM##########\n\n"
Subject:
LIBRARYSYSTEM\n\n"
Language:
CLanguage\n\n"
for(i=0;
;
for(k=0;
\tPleaseEnterTheCode:
%ld"
a);
if(a!
=123456)
Error!
PleaseTryAgain:
elsebreak;
Logging.....\nWelcomeUSETHELIBRARYSYSTEM!
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 图书 信息管理 系统 代码