下载此文档

图书管管理系统源代码.doc


文档分类:IT计算机 | 页数:约56页 举报非法文档有奖
1/56
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/56 下载此文档
文档列表 文档介绍
该【图书管管理系统源代码 】是由【可爱的嘎嘎】上传分享,文档一共【56】页,该文档可以免费在线阅读,需要了解更多关于【图书管管理系统源代码 】的内容,可以使用淘豆网的站内搜索功能,选择自己适合的文档,以下文字是截取该文章内的部分文字,如需要获得完整电子版,请下载此文档到您的设备,方便您编辑和打印。精品文档就在这里-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------精品文档---------------------------------------------------------------------图书管管理系统源代码经过三周小学期教学,终于把任务完成了,先把成果贴在这,:#include<>#include<>#include<>#include<>#include<>structreaders_list{charreadernum[20];/*读者学号*/charreadername[20];/*读者姓名*/charreaderage[10];/*读者年龄*/charsex[10];/*读者性别*/charreader1[20];/*读者职业*/charreader2[20];/*读者单位*/charreadertel[20];/*读者电话*/structreaders_list*next;/*链表的指针域*/};structbooks_list{charauthor[20];/*作者名*/charbookname[20];/*书名*/charpublisher[20];/*出版单位*/charpbtime[15];/*出版时间*/charbooknum[20];/*图书编号*/floatprice;/*价格*/charclassfy[20];/*分类号*/intnum;/*图书数量*/structbooks_list*next;/*链表的指针域*/};structborrow_lend_list{charreadernum[20];/*读者学号*/charbooknum[20];/*图书编号*/charborrowtime[15];/*借书时间*/charbacktime1[15];/*应归还时间*/charbacktime2[15];/*实际归还时间*/charother[20];/*备注*/structborrow_lend_list*next;/*精品文档就在这里-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------精品文档---------------------------------------------------------------------链表的指针域*/};structreaders_list*head1;structbooks_list*head2;structborrow_lend_list*head3;voidsave1(structreaders_list*tp);/*保存数据至读者文件*/voidsave2(structbooks_list*tp);/*保存数据至图书文件*/voidsave3(structborrow_lend_list*tp);voidborrow_book();voidborrow_reader();structreaders_list*CreateDoc1();/*新建读者链表*/structbooks_list*CreateDoc2();/*新建图书链表*/structborrow_lend_list*CreateDoc3();voidInsertDoc1(??);/*读者插入*/voidInsertDoc2(??);/*图书插入*/voidInsertDoc3(??);structreaders_list*head1DeleteDoc1(structreaders_list*head1);/*读者信息删除*/structbooks_list*head2DeleteDoc2(structbooks_list*head2);/*图书信息删除*/structborrow_lend_list*DeleteDoc3(structborrow_lend_list*head3);voidsearch_reader(charread[20]);/*读者查询*/voidsearch_book(charbook[20]);/*图书查询*/voidinfo_change1(structreaders_list*head1);/*读者修改*/voidinfo_change2(structbooks_list*head2);/*图书修改*/voidinfo_change3(structborrow_lend_list*head3);/*图书修改*/intpassword();voidchangepassword();//*************************************************************************************************/*保存读者数据至文件*///******************************************************************************voidsave1(structreaders_list*tp){structreaders_list*p;FILE*fp;p=tp;fp=fopen("","wb+");/**/while(p!=NULL){fwrite(p,sizeof(structreaders_list),1,fp);p=p->next;}fclose(fp);printf("\n精品文档就在这里-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------精品文档---------------------------------------------------------------------\n");}/*保存图书数据至文件*/voidsave2(structbooks_list*tp){structbooks_list*p;FILE*fp;p=tp;fp=fopen("","wb+");/**/while(p!=NULL){fwrite(p,sizeof(structbooks_list),1,fp);p=p->next;}fclose(fp);printf("\\n");}/*保存借/还书数据至文件*/voidsave3(structborrow_lend_list*tp){structborrow_lend_list*p;FILE*fp;p=tp;fp=fopen("","wb+");/**/while(p!=NULL){fwrite(p,sizeof(structborrow_lend_list),1,fp);p=p->next;}fclose(fp);printf("\n已将借/\n");}//**********************************************************************************************//**********************************************************************************************/*录入读者信息*/structreaders_list*CreateDoc1(){/*定义结构体指针变量s指向开辟的新结点首地址p为中间变量*/structreaders_list*s,*p,*head;charflag='Y';/*定义flag,方便用户选择重复输入*/intu=0;p=NULL;head=p;精品文档就在这里-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------精品文档---------------------------------------------------------------------while(flag=='Y'||flag=='y'){s=(structreaders_list*)malloc(sizeof(structreaders_list));if(s==NULL)??{printf("mallocerror.\n");????break;??}printf("\n请输入读者学号:");fflush(stdin);scanf("%s",s->readernum);printf("\n请输入读者姓名:");fflush(stdin);scanf("%s",s->readername);printf("\n请输入读者年龄:");fflush(stdin);scanf("%s",s->readerage);printf("\n请输入读者性别:");fflush(stdin);scanf("%s",s->sex);printf("\n请输入读者职业:");fflush(stdin);scanf("%s",s->reader1);printf("\n请输入读者单位:");fflush(stdin);scanf("%s",s->reader2);printf("\n请输入读者电话:");fflush(stdin);scanf("%s",s->readertel);printf("\n");s->next=NULL;if(head==NULL)head=p=s;else{p->next=s;p=s;}printf("━━━━添加成功!━━━━");printf("\n继续添加?(Y/N):");fflush(stdin);scanf("%c",&flag);printf("\n");if(flag=='N'||flag=='n')??????????break;elseif(flag=='Y'||flag=='y')精品文档就在这里-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------精品文档---------------------------------------------------------------------?????????continue;else{while(1){u=0;???printf("请重新选择,是否继续添加?(Y/N):");??????fflush(stdin);??????scanf("%c",&flag);??????printf("\n");??????if(flag=='N'||flag=='n')???????????????break;??????elseif(flag=='Y'||flag=='y')????????{??????????u=1;?????break;????????}???elsecontinue;???}}if(u==1)??{u=0;continue;}elsebreak;}save1(head);/*保存数据至文件*/return(head);}/*录入图书信息*/structbooks_list*CreateDoc2(){/*定义结构体指针变量s指向开辟的新结点首地址p为中间变量*/structbooks_list*s,*p,*head;charflag='Y';/*定义flag,方便用户选择重复输入*/intu=0;p=NULL;head=p;while(flag=='Y'||flag=='y'){s=(structbooks_list*)malloc(sizeof(structbooks_list));if(s==NULL)??{printf("mallocerror.\n");????break;精品文档就在这里-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------精品文档---------------------------------------------------------------------??}printf("\n请输入图书书号:");fflush(stdin);scanf("%s",s->booknum);printf("\n请输入图书书名:");fflush(stdin);scanf("%s",s->bookname);printf("\n请输入图书作者名:");fflush(stdin);scanf("%s",s->author);printf("\n请输入图书出版社:");fflush(stdin);scanf("%s",s->publisher);printf("\n请输入图书出版时间:");fflush(stdin);scanf("%s",s->pbtime);printf("\n请输入图书分类号:");fflush(stdin);scanf("%s",s->classfy);printf("\n请输入图书价格:");fflush(stdin);scanf("%f",&s->price);printf("\n请输入图书数量:");fflush(stdin);scanf("%d",&s->num);printf("\n");s->next=NULL;if(head==NULL)head=p=s;else{p->next=s;p=s;}printf("━━━━添加成功!━━━━");printf("\n继续添加?(Y/N):");fflush(stdin);scanf("%c",&flag);printf("\n");if(flag=='N'||flag=='n')????break;elseif(flag=='Y'||flag=='y')???continue;else{while(1)精品文档就在这里-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------精品文档---------------------------------------------------------------------{??u=0;???printf("请重新选择,是否继续添加?(Y/N):");??????fflush(stdin);??????scanf("%c",&flag);??????printf("\n");??????if(flag=='N'||flag=='n')?????????????break;??????elseif(flag=='Y'||flag=='y')??????{??????????u=1;??????????break;????????}???elsecontinue;???}}if(u==1)??{u=0;continue;}elsebreak;}save2(head);/*保存数据至文件*/return(head);}/*录入借书信息*/structborrow_lend_list*CreateDoc31(){/*定义结构体指针变量s指向开辟的新结点首地址p为中间变量*/structborrow_lend_list*s,*p,*head;structbooks_list*p2;charflag='Y';/*定义flag,方便用户选择重复输入*/intu=0;p=NULL;head=p;while(flag=='Y'||flag=='y'){s=(structborrow_lend_list*)malloc(sizeof(structborrow_lend_list));if(s==NULL)??{printf("mallocerror.\n");????break;??}printf("\n精品文档就在这里-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------精品文档---------------------------------------------------------------------请输入读者学号:");fflush(stdin);scanf("%s",s->readernum);printf("\n请输入图书编号:");fflush(stdin);scanf("%s",s->booknum);printf("\n请输入借书时间:");fflush(stdin);scanf("%s",s->borrowtime);printf("\n请输入应归还时间:");fflush(stdin);scanf("%s",s->backtime1);strcpy(s->backtime2,"--------");strcpy(s->other,"--------");printf("\n请输入备注:");fflush(stdin);gets(s->other);printf("\n");s->next=NULL;if(head==NULL)head=p=s;else{p->next=s;p=s;}p2=head2;while(p2!=NULL){if(strcmp(p2->booknum,s->booknum)==0){??p2->num-=1;??break;}elsep2=p2->next;}save2(head2);printf("━━━━添加成功!━━━━");printf("\n继续添加?(Y/N):");fflush(stdin);scanf("%c",&flag);printf("\n");if(flag=='N'||flag=='n')????break;elseif(flag=='Y'||flag=='y')???continue;精品文档就在这里-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------精品文档---------------------------------------------------------------------else{while(1){??u=0;???printf("请重新选择,是否继续添加?(Y/N):");??????fflush(stdin);??????scanf("%c",&flag);??????printf("\n");??????if(flag=='N'||flag=='n')???????????????break;??????elseif(flag=='Y'||flag=='y')????????{??????????u=1;??????????break;????????}???elsecontinue;???}}if(u==1)????{u=0;continue;}elsebreak;}save3(head);/*保存数据至文件*/return(head);}/*录入还书信息*/structborrow_lend_list*CreateDoc32(){/*定义结构体指针变量s指向开辟的新结点首地址p为中间变量*/structborrow_lend_list*s,*p;structbooks_list*p2;charflag='Y';/*定义flag,方便用户选择重复输入*/intu=0;while(flag=='Y'||flag=='y'){???????s=(structborrow_lend_list*)malloc(sizeof(structborrow_lend_list));??printf("\n请输入读者学号:");??fflush(stdin);??scanf("%s",s->readernum);精品文档就在这里-------------各类专业好文档,值得你下载,教育,管理,论文,制度,方案手册,应有尽有-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------精品文档---------------------------------------------------------------------??printf("\n请输入图书编号:");??fflush(stdin);??scanf("%s",s->booknum);??printf("\n请输入实际归还时间:");??fflush(stdin);??gets(s->backtime2);??printf("\n请输入备注:");??fflush(stdin);??gets(s->other);??printf("\n");??p2=head2;??while(p2!=NULL)??{???if(strcmp(p2->booknum,s->booknum)==0)???{????p2->num+=1;????break;???}???elsep2=p2->next;??}??save2(head2);??p=head3;??while(p!=NULL)??{????????????if(strcmp(p->booknum,s->booknum)==0&&strcmp(p->booknum,s->booknum)==0)???{????strcpy(p->backtime2,s->backtime2);????strcpy(p->other,s->other);????break;???}???elsep=p->next;??}??save3(head3);??printf("━━━━添加成功!━━━━");??printf("\n继续添加?(Y/N):");??fflush(stdin);??scanf("%c",&flag);??printf("\n");??if(flag=='N'||flag=='n')???break;??elseif(flag=='Y'||flag=='y')???continue;??else{

图书管管理系统源代码 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数56
  • 收藏数0 收藏
  • 顶次数0
  • 上传人可爱的嘎嘎
  • 文件大小42 KB
  • 时间2024-04-16