电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

c语言图书销售系统(源代码)VIP免费

c语言图书销售系统(源代码)_第1页
1/33
c语言图书销售系统(源代码)_第2页
2/33
c语言图书销售系统(源代码)_第3页
3/33
#include#include#include#include#include#include#defineLENsizeof(structbook)#defineVLENsizeof(structvip)#defineSLENsizeof(structsales)structvip*vhead=NULL;structvip*v1,*v2;structsales*shead=NULL;structsales*s1,*s2;intV,S;/*结构体定义*/structbook{charbnum[12];/*书号*/charbname[41];/*书名*/charauthor[20];/*作者*/floatprice;/*书价*/intacount;/*书存在本数*/structbook*next;};structsales{floatcount;structsales*snext;};structvip{charvnum[12];charvname[41];intlevel;floatpersum;floatdiscount;structvip*vnext;};/*函数声明*/voidloadbook();/*自动读入书库信息*/voidwelcome();/*欢迎界面显示*/voidinputbook();/*增加书本信息*/voidloadvip();voidloadsales();/*自动录入销售信息*/voiddaysales();/*日销售额*/voidmonthsales();/*月销售额*/voidyearsales();/*年销售额*/voidsearch();/*查询书数量*/voidsearch_by_bnum();/*通过书号查询*/voidsearch_by_bname();/*通过书名查询*/voidsearch_by_author();/*通过作者查询*/voidbuy();/*购买书籍*/voidlist();/*列出书库信息*/voidlistvip();voidlistsales();/*列出销售信息*/voiddelet();/*删除书目*/voiddelet_by_bnum();/*通过书号删除*/voiddelet_by_bname();/*通过书名删除*/voiddelet_by_author();/*通过作者删除*/voidsave();/*保存记录*/voidredef();/*修改密码*/voidbover();/*显示已售完的书*/voidbuy_by_huiyuan();/*会员买书*/voidbuy_by_feihuiyuan();/*非会员买书*/voidexit0();/*退出*/intmenu();/*主菜单*/voidprint2();/*显示查询菜单*/voidprintdelete();/*显示删除菜单*/structbook*head=NULL,*head2=NULL;/*head和head2分别用于书库的头指针和已购书的头指针*/structbook*p1,*p2,*p3,*p4,*p5,*p6;/*p1、p2、p3用于操作书库图书,p4、p5、p6用于操作已购书*/intsave_flag=0;/*图书信息变动标志*/intbuy_flag=0;/*买书时,是否调用过查询功能标志*/intshan_flag=0;/*删书时,是否调用过显示已售完书功能标志*/intT=0;/*记录导入的书本数*/charmima[11]="123456";/*初始密码*/voidbookmanage();voidsalesmanage();/*销售统计*/intmain()/*主函数*/{welcome();/*欢迎界面显示*/loadbook();loadsales();loadvip();/*自动导入书库信息*/while(1){switch(menu()){case1:system("cls");bookmanage();break;case2:system("cls");buy();break;case3:system("cls");listvip();break;case4:system("cls");;salesmanage();break;case5:system("cls");;break;case0:system("cls");exit0();break;default:{printf("\n选择错误,请按主菜单提示输入您的正确选择(0~8)\n");printf("按任意键返回继续:");rewind(stdin);/*清空缓冲区*/getch();}}}return0;}/*菜单*/intmenu(){intchoice;system("cls");/*系统清屏*/printf("\n*************************主菜单*************************\n\n");printf("1.图书管理\n\n");printf("2.销售管理\n\n");printf("3.会员管理\n\n");printf("4.销售额统计\n\n");printf("5.说明\n\n");printf("0.退出\n\n\n");printf("请输入您的选择(0~8):");rewind(stdin);/*清空缓冲区*/scanf("%d",&choice);returnchoice;/*返回用户的选择*/}voidbookmanage(){system("cls");intchoice1;do{printf("");/*显示菜单*/printf("*************图书管理*************");printf("");printf("");printf("功能选项:\n");printf("1:图书信息录入\n");printf("2:图书信息浏览\n");printf("3:图书信息查询\n");printf("4:图书信息删除\n");printf("5:图书信息保存\n");printf("0:返回主界面\n");printf("");printf("\t请选择操作:");scanf("%d",&choice1);switch(choice1)/*菜单选择*/{case1:system("cls");inputbook();break;case2:system("cls");list();break;case3:system("cls");search();break;case4:system("cls");delet();break;case5:system("cls");save();break;case0:system("cls");break;}}while(choice1!=0...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

c语言图书销售系统(源代码)

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部