图书管理系统源码Word下载.docx

上传人:b****2 文档编号:4782325 上传时间:2023-05-04 格式:DOCX 页数:38 大小:19.90KB
下载 相关 举报
图书管理系统源码Word下载.docx_第1页
第1页 / 共38页
图书管理系统源码Word下载.docx_第2页
第2页 / 共38页
图书管理系统源码Word下载.docx_第3页
第3页 / 共38页
图书管理系统源码Word下载.docx_第4页
第4页 / 共38页
图书管理系统源码Word下载.docx_第5页
第5页 / 共38页
图书管理系统源码Word下载.docx_第6页
第6页 / 共38页
图书管理系统源码Word下载.docx_第7页
第7页 / 共38页
图书管理系统源码Word下载.docx_第8页
第8页 / 共38页
图书管理系统源码Word下载.docx_第9页
第9页 / 共38页
图书管理系统源码Word下载.docx_第10页
第10页 / 共38页
图书管理系统源码Word下载.docx_第11页
第11页 / 共38页
图书管理系统源码Word下载.docx_第12页
第12页 / 共38页
图书管理系统源码Word下载.docx_第13页
第13页 / 共38页
图书管理系统源码Word下载.docx_第14页
第14页 / 共38页
图书管理系统源码Word下载.docx_第15页
第15页 / 共38页
图书管理系统源码Word下载.docx_第16页
第16页 / 共38页
图书管理系统源码Word下载.docx_第17页
第17页 / 共38页
图书管理系统源码Word下载.docx_第18页
第18页 / 共38页
图书管理系统源码Word下载.docx_第19页
第19页 / 共38页
图书管理系统源码Word下载.docx_第20页
第20页 / 共38页
亲,该文档总共38页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

图书管理系统源码Word下载.docx

《图书管理系统源码Word下载.docx》由会员分享,可在线阅读,更多相关《图书管理系统源码Word下载.docx(38页珍藏版)》请在冰点文库上搜索。

图书管理系统源码Word下载.docx

voidenter(void);

voiddls_store(structbooks*i,structbooks**head,structbooks**last);

//按书号排序

structbooks*find(char*bn);

//按书名查找

voidsearch(void);

voidmodify(void);

//修改信息

voiddisplay(structbooks*p);

//显示出来的格式

voidlist(void);

voiddel(structbooks**head,structbooks**last);

voidsave(void);

voidload(void);

voidxiumian(intx)//主程序的部分的休眠

Sleep(x);

printf("

正在载入...........\n"

);

}

voidtime1()//调用系统时间

{time_tt;

time(&

t);

\t\t\t\t\t%s\n"

ctime(&

t));

voidjiemian()//主界面

time1();

system("

cls"

while(!

kbhit())//按任意键停止的函数

{

****************************************************************************\n"

system("

color17"

Sleep(100);

************图**********图**************************************************\n"

color18"

********************书*********书*******************************************\n"

color19"

****************************馆*********馆***********************************\n"

color11"

**********************************欢*********欢*****************************\n"

color12"

******************************************迎********迎**********************\n"

color13"

************************************************您*********您***************\n"

Sleep(10);

}

jiemian2()

kbhit())

********************************************************************************\n"

Sleep(500);

*************图**********图*****************************************************\n"

color28"

*********************书*********书**********************************************\n"

color39"

*********************************馆*********馆**********************************\n"

color41"

***************************************欢*********欢****************************\n"

color52"

***********************************************迎********迎*********************\n"

color63"

*****************************************************您*********您**************\n"

Sleep(1000);

voidtuichu()//第一个jiemian的退出函数

exit

(1);

voidjiemian1()//退出界面

jiemian2();

Sleep(100);

系统正在退出·

·

\n"

Sleep(500);

tuichu();

intmenu(void)//管理员登陆界面

chars[20];

intc;

\t\t******************图书信息管理系统*****************\n"

\t\t*\t\t||1.图书信息输入*\n"

\t\t*\t\t||2.图书信息浏览*\n"

\t\t*\t\t||3.图书信息查询*\n"

\t\t*\t\t||4.图书信息修改*\n"

\t\t*\t\t||5.图书信息删除*\n"

\t\t*\t\t||6.存储图书信息*\n"

\t\t*\t\t||7.载入图书信息*\n"

\t\t*\t\t||8.返回*\n"

\t\t******************图书信息管理系统*****************\n\n\n"

\t\t请输入以上序号进行选择:

do{

gets(s);

c=atoi(s);

}while(c<

0||c>

8);

returnc;

voidinputs(char*prompt,char*s,intcount)//输入的格式,检测输入的长度

charp[255];

printf(prompt);

gets(p);

if(strlen(p)>

20)

\nToolong\n"

}while(strlen(p)>

20);

strcpy(s,p);

}

voidenter(void)

charch;

structbooks*p;

while

(1)

{

p=(structbooks*)malloc(sizeof(structbooks));

inputs("

请输入书的编号:

"

p->

booknum,20);

请输入书名:

bookname,20);

请输作者名:

authorname,20);

请输入出版社:

cbs,20);

请输入图书价格:

price,5);

dls_store(p,&

head,&

last);

是否继续输入(Y/N):

ch=getchar();

if(ch=='

N'

)break;

fflush(stdin);

voiddls_store(structbooks*i,structbooks**head,structbooks**last)//按书号排序

structbooks*p,*old;

if((*last)==NULL)

i->

prior=NULL;

next=NULL;

(*head)=i;

(*last)=i;

return;

p=(structbooks*)malloc(sizeof(structbooks));

p=(*head);

old=NULL;

while(p!

=NULL)

if(strcmp(p->

booknum,i->

booknum)<

0)

old=p;

p=p->

next;

else

if(p->

prior)

p->

prior->

next=i;

next=p;

prior=p->

prior;

prior=i;

*head=i;

old->

prior=old;

*last=i;

structbooks*find(char*bookname)//按书名找

//system("

p=head;

if(strcmp(bookname,p->

bookname)==0)

returnp;

returnNULL;

structbooks*find1(char*bookname)//按书名找的过程

p=head1;

voidsearch(void)//按书名找

charname[20];

请输入你要查询的书名:

gets(name);

p=find(name);

if(p==NULL)

没有找到你查询的信息.\n"

else

display(p);

voidmodify(void)//书名查找并修改信息

if(p==NULL)printf("

else//把P覆盖,覆盖原始信息

voiddisplay(structbooks*p)//输出P

%s\t\t"

booknum);

bookname);

authorname);

cbs);

%s\t"

price);

voidlist(void)//格式

书号\t\t书名\t\t作者\t\t出版社\t\t价格\n"

while(p!

=NULL)

voidlist1()//学生借书输出的格式

display(p);

//p1=p;

p=p->

//free(p1);

//free(p1);

voiddls_store1(structbooks*i,structbooks**head1,structbooks**last1)//学生借书的按书号排序

if((*last1)==NULL)

(*head1)=i;

(*last1)=i;

p=(*head1);

*head1=i;

*last1=i;

//list1();

voiddel(structbooks**head,structbooks**last)//删除信息,节点

structbooks*i;

chars[50];

输入书名:

s,20);

i=find(s);

if(i)

if(*head==i)

*head=i->

if(*head)

(*head)->

*last=NULL;

next=i->

if(i!

=*last)

next->

prior=i->

*last=i->

free(i);

voiddel2(structbooks**head,structbooks**last,charname[20])

//chars[50];

//inputs("

i=find(name);

*head=i->

if(*head)

(*head)->

*last=NULL;

voiddel1(structbooks**head1,structbooks**last1,charname[20])

if(*head1==i)

*head1=i->

if(*head1)(*head1)->

else*last1=NULL;

=*last1)

*last1=i->

voidsave(void)//储存

FILE*fp;

if((fp=fopen("

books.txt"

"

wb"

))==NULL)

openfileerror

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2