ImageVerifierCode 换一换
格式:DOC , 页数:21 ,大小:170.50KB ,
资源ID:9631240      下载积分:8 金币
验证码下载
登录下载
邮箱/手机:
图形码:
验证码: 获取验证码
温馨提示:
支付成功后,系统会自动生成账号(用户名为邮箱或者手机号,密码是验证码),方便下次登录下载和查询订单;
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/9631240.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请。


权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4009-655-100;投诉/维权电话:18658249818。

注意事项

本文(c语言程序设计超市管理系统.doc)为本站上传会员【鼓***】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

c语言程序设计超市管理系统.doc

1、实验题目:超市管理系统 一、 实验目的 1. 熟悉c语言的编译连接和运行过程。 2. 掌握c语言的数据类型,熟悉整型、实型、字符型变量的定义方式及如何给它们赋值。 3. 掌握if语句及switch语句的运用方法及嵌套应用方法。 4. 掌握实现循环结构的三种语句while、 do-while.、for 的使用。 5. 掌握函数的定义方法和调用方法。 6. 能够采用模块化思想调试程序。 二.实验内容 1. 编写程序并进行调试运行。 2. 输入商品资料,并保存于文件。每件商品包含信息如:商品号、商品名、商品类别、商品总量、商品上限和下限、商品价格、进货日期、生产日期、保质期等

2、 3. 对已存入的商品信息进行更新操作,包括添加一件商品信息、删除某件商品信息和修改商品信息。 4. 通过按商品名、商品种类、商品进货量的方式查询商品信息。 5.输入某商品号后对其利润进行统计、对进货价格相同的商品进行统计。 6 对商品的库存量和利润进行排序。 7.最后输出商品信息,供需要时打印。 二、 需求分析 1. 该程序可用于对商品的基本信息的存储、更新、查询、输出、统计、排序等操作,以实现管理者对商品的管理和消费者对商品的了解。 2. 其中更新功能包括:添加信息、删除信息、修改信息、可根据需要添加一个或多件商品信息,也可对个别商品信息进行适当的删除或修改。

3、以便随时更新商品信息。 3. 程序中设计的查询功能可根据需要从若干数据中查询某件商品信息,并且可根据三种不同的方法查询:按商品名查询、按商品种类查询和按商品进货量查询。以满足不同的需要。 四、概要设计 1、方案设计 对系统进行分析,给出结构图 分析:系统要求实现许多的功能,因此遵循结构化程序设计思想来进行本系统的设计—自顶向下、逐步细化,将系统设计任务分解出许多子功能模块进行设计 结构图如下: 超市管理管理系统 退出系统 消费者管理系统 管理者系统 统计模块 排序模块 查询模块 退出系统 利

4、润排行 退出系统 录入信息 退 出 系 统 添加商品信息 按进货量查询 按商品种类查 按商品名查询 退出系统 查询模块 排序模块询模块 退出系统 输出信息 更新模块 退出系统 第一类商品 第二类商品 按商品名查询 按进货量查询 退出系统 按商品 种类 查 寻 利润排行 库存量排行 退出系统 第三类商品 修改商品信息 删除商品信息 库存量排行 2.功能模块说明: 对各个模块进行功能的描述 (1).输入模块: 录入需要管理的商品信息并将信息保存于文件中,以方便日后进行打印、读取、更新等操作。 (2).添加模块:

5、 可添加一件或多件商品信息,并将所添加商品信息保存,方便查找。 (3).删除模块: 可对过期的商品做删除处理。 (4).修改模块: 可根据需要对多件商品信息进行修改,也可随时对个别项进行修改。 (5).查询模块: 可对已建立的商品信息进行查询,并且可根据需要选择按商品名查询或按商品种类查询或按商品进货量查询。 (6).保存模块: 用于对信息进行保存。 (7).输出模块: 将所有商品信息或想要查询的商品信息显示于屏幕,用于打印商品信息或查找某些商品信息。 (8) 排序模块: 根据商品的利润和进货量进行排序。 (9) 统计模块: 统计商品的利润和对进货价格相同的商

6、品进行统计。 (10).退出系统: 选择该项,自动退出该系统。 五、详细设计及运行结果 流程图, 函数之间相互调用的图示 ,程序设计及编码, 运行结果。 开 始 输入i值 判断i值 退出系统 消费者系统 管理者系统 退出系统 排序模块 查询模块 输入模块 查询模块 统计模块 排序模块 更新模块 输出模块 退出系统 输入统计值 输入查询

7、 值 输入排序值 输入更新值 输入查询 值 输入排序值 退出系统 添加信息 删除信息 修改信息 退出系统 利润排序 库存排序 退出系统 一类商品 二类商品 三类商品 退出系统 按名查询 按种类查 按进货量 库存排序 利润排序 退出系统 按种类查 按名查询 按进货量 退出系统 六. 调试情况及运行结果 1、 对自己设计进行评价,指出合理和不足之处,提出改进的方案。 此次实践课编写的是一个应用程序,相对于以前我们见到的程序,它要大得多,于是就按课本上的例子编了超市管理系

8、统,先把界面弄好然后再添加各模块,而且各模块也出现了不少问题,在同学们和老师的帮助下,我很有耐心的一次又一次的进行修改,最后运行的结果基本上达到了预期的目的。可结果还不是太理想。 由于时间很短,在选题报告中设想到的好多功能都没有实现。已有的那些功能虽已能基本上满足管理者和消费者的需要,但如果还有更多的功能程序就会更加完美。如:进入系统时没有设制密码,保护性不够强;在输入商品号时没有出错提示,如果商品号输入负值 2、在设计过程中的感受。 本次C 语言的实习课让我对C 语言的学习又有了更深入的了解,也让我更深刻地领悟到了“实践出真理”这个道理,在上机实践过程中学到的知识远远超过了

9、在课堂上十几周学到的,学校组织的这次实习让我们这些实践知识匮乏的大学生增添了许多社会经验,为我们将来走上工作岗位其了不小的铺垫作用。 本次实习中遇到了很多以前没有遇到过的问题,也曾想过要放弃,但看到那些同学都在那认真的写程序,给了我继续的信心。在同学的帮助下,我顺利的结束了本次实习,让我知道原来凭借自己努力取得的成功会让自己这么欣慰,也让我知道了友谊和团结的重要性。 七.参考文献 《C语言程序设计》 王曙燕 曹锰 科学出版社 八。附录:

10、 #include #include #define MAX 3 #define N 3 #define PAGE 2 #define PRINTF1 printf("---------------------------------------------------------------------\n") #define PRINTF2 printf("num----name----kind----out_price----pro_time(year-month-day)----save_time\n"); #define PR

11、INTF3 printf("%d%8s %7s %8d %5d-%2d-%2d %10d\n",goods[i].num,goods[i].name,goods[i].kind,goods[i].out_price,goods[i].pro_time.year,goods[i].pro_time.month,goods[i].pro_time.day,goods[i].save_day); int sum; /*data struct kind*/ struct data { int year; int month; in

12、t day; }; /*goods struct kind*/ struct goods { int num; char name[10]; char kind[10]; int amount; int goods_up; int goods_down; int in_price; int out_price; int in_num; struct data in_time; struct data pro_time; char factory[10];

13、 int save_day; float profit; }goods[MAX]; /*save message*/ save_message(int sum) { FILE *fp; int i; if((fp=fopen("goods.txt","wb"))==NULL) { printf("read the file error!\n"); return; } for(i=0;i

14、sizeof(struct goods),1,fp)!=1) printf("write the file error!\n"); fclose(fp); } /*input message*/ input_message() { int i=0,s=MAX; system("cls"); printf("\n\n input goods message the most%d\n\n",s); do { printf("\n di%dgoods",i

15、1); printf("\n num:"); scanf("%d",&goods[i].num); if(goods[i].num==0) break; printf("\n name:"); scanf("%s",goods[i].name); printf("\n kind:"); scanf("%s",goods[i].kind); printf("\n amount:"); scanf("%d",&goods[i].amount);

16、 printf("\n goods_up:"); scanf("%d",&goods[i].goods_up); printf("\n goods_down:"); scanf("%d",&goods[i].goods_down); printf("\n in_price:"); scanf("%d",&goods[i].in_price); printf("\n out_price:"); fflush(stdin); scanf("%d",&goods[i].out_pr

17、ice); printf("\n in_num:"); scanf("%d",&goods[i].in_num); printf("\n in_time:"); scanf("%d-%d-%d",&goods[i].in_time.year,&goods[i].in_time.month, &goods[i].in_time.day); printf("\n pro_time:"); scanf("%d-%d-%d",&goods[i].pro_time.year,&goods[

18、i].pro_time.month, &goods[i].pro_time.day); printf("\n factory:"); scanf("%s",goods[i].factory); printf("\n save_time:"); scanf("%d",&goods[i].save_day); i++; }while(i

19、 printf("\n press any key to return!"); bioskey(0) ; } /*read message*/ int read_message() { FILE *fp; int i=0; if((fp=fopen("goods.txt","rb"))==NULL) { printf("\n\n ******there is no any message,press any key to return !******\n"); return;

20、 } while(feof(fp)!=1) { fread(&goods[i],sizeof(struct goods),1,fp); if(goods[i].num==0) break; else i++; } fclose(fp); return(i); } /*output message*/ output_message() { int i=0,j=0,count,page=1; sy

21、stem("cls"); printf("\n\n --goods message,di %d page\n\n",page); PRINTF2; PRINTF1; do { if(goods[i].num!=0) { j++; if(j%PAGE!=0) { PRINTF3; PRINTF1; } else {

22、 PRINTF3; PRINTF1; if(goods[i+1].num!=0) { printf("press any key to return!"); getch(); system("cls"); printf("\n\n --goods message,di%d page\n\n",++page); PRINTF2;

23、 PRINTF1; } } } i++; } while(i

24、 insert a new goods\n"); printf(" ----------------------\n"); do { goods[i].num=++sum; printf("\n new num:"); scanf("%d",&goods[i].num); printf("\n new name:"); scanf("%s",goods[i].name); prin

25、tf("\n new kind:"); scanf("%s",goods[i].kind); printf("\n new amount:"); scanf("%d",&goods[i].amount); printf("\n new goods_up: "); scanf("%d",&goods[i].goods_up); printf("\n new goods_down:");

26、 scanf("%d",&goods[i].goods_down); printf("\n new in_price: "); scanf("%d",&goods[i].in_price); printf("\n new out_price:"); scanf("%d",&goods[i].out_price); printf("\n new in_num:"); scanf("%d",&goo

27、ds[i].in_num); printf("\n new in_time:"); scanf("%d-%d-%d",&goods[i].in_time.year, &goods[i].in_time.month, &goods[i].in_time.day); printf("\n new pro_time:"); scanf("%d-%d-%d",&goods[i].pro_time.year

28、 &goods[i].pro_time.month, &goods[i].pro_time.day); printf("\n new factory: "); scanf("%s",goods[i].factory); printf("\n new save_time: "); scanf("%d",&goods[i].save_day); printf("\n

29、 go on or not?(Y/N)"); choice=getch(); if(choice=='Y'||choice=='y') { printf("\n go on!\n"); i++; flag=1; } else flag=0; }while(flag==1); printf("\n press any key return!"); bioskey(0); } /*renew

30、 goods message*/ renew_message() { int choice; do { system("cls"); printf("\n\n\n *******renew goods message*******\n\n"); printf(" 1: insert goods message\n\n"); printf(" 2: del goods message\n\n"); printf("

31、 3: revise goods message\n\n"); printf(" 0: return\n\n "); printf(" please choose(0-3):"); scanf("%d",&choice); switch(choice) { case 1: insert_message(); break; case 2: del_message();

32、 break; case 3: revise_message(); break; case 0: break; } }while(choice!=0); } /*del goods message*/ del_message() { int i=0,del_num,flag,k; char choice,choice1; do { system("cls"); prin

33、tf("\n --please input the del goods num:--\n"); scanf("%d",&del_num); printf("\n --really del the goods?(Y/N)"); choice1=getch(); if(choice1=='Y'||choice1=='y') printf("\n --continue!--\n"); for(i=0;i

34、 { printf("\n --goods message--\n"); PRINTF1; PRINTF2; PRINTF3; for(k=i;k

35、 } if(i==sum) { printf("\n --the goods is not exist!--\n"); getch(); } printf("\n\n --go on or not?Y/N--\n"); choice=getch(); if(choice=='Y'||choice=='y') { flag=1; printf("\n --go on--\n

36、"); } else flag=0; }while(flag==1); printf("\n --press any key return--\n"); bioskey(0); } /*revise goods message*/ revise_message() { int i=0,choice,revise_num,flag; char choice1; do { system("cls"); printf("\n pl

37、ease input the revise goods num:"); scanf("%d",&revise_num); for(i=0;i

38、\n "); printf("\n 1: name\n"); printf("\n 2: kind\n"); printf("\n 3: out_price\n"); printf("\n 4: pro_time\n"); printf("\n 5: save_day\n"); printf("\n please choose(1-5)"); scanf("

39、d",&choice); switch(choice) { case 1: printf("\n after revise num: "); scanf("%s",goods[i].name); break; case 2: printf("\n after revise kind: "); scanf("%s",goods[i].kind); break; c

40、ase 3: printf("\n after revise out_price:"); scanf("%d",&goods[i].out_price); break; case 4: printf("\n after revise pro_time:"); scanf("%d-%d-%d",&goods[i].pro_time.year, &goods[i].pro_time.month,

41、 &goods[i].pro_time.day); break; case 5: printf("\n after revise save_time:"); scanf("%d",&goods[i].save_day); break; } PRINTF1; PRINTF2; PRINTF3; break; } else i++;} if(i=

42、sum) { printf("\n this goods is not exist!"); getch(); } printf("\n\n continue revise?(Y/N)"); choice1=getch(); if(choice1=='Y'||choice1=='y') { flag=1; printf("\n continue!\n"); } else flag=0; }while(fla

43、g==1); printf("\n press any key return\n"); bioskey(0); } /*inquire goods message*/ inquire_message() { int choice; do { system("cls"); printf("\n\n **********inquire goods message***********\n\n"); printf(" 1: inquire goods

44、 according to name \n\n"); printf(" 2: inquire goods according to kind\n\n") ; printf(" 3: inquire goods according to in_num\n\n"); printf(" 0: return\n\n"); printf(" please choose (0-3): "); scanf("%d",&choice);

45、 switch(choice) { case 1: inquire_name(); break; case 2: inquire_kind(); break; case 3: inquire_count(); break; case 0: break; } }while(choice!=0); } /*inquire according to na

46、me*/ inquire_name() { int i,choice,j=0,inquire_in_price; char inquire_name[10]; system("cls"); printf("\n input the inquire goods name:"); scanf("%s",inquire_name); for(i=0;i

47、 { printf("\n --goods message-- \n"); PRINTF1; PRINTF2; PRINTF3; } else j++; if(j==sum) printf("\n the good is not exist!"); bioskey(0); } } /* inquire accordingto kind */ inq

48、uire_kind() {int i,j=0; char inquire_kind[10]; clrscr(); printf("\n please input the inquire goods kind:"); scanf("%s",inquire_kind); for(i=0;i

49、PRINTF3;} else j++; if(j==sum) printf("\n this goods is not exist!"); bioskey(0); } /*inquire according to in_num*/ inquire_count() {int i,inquire_count,j=0; clrscr(); printf("\n please input the inquire in_num:"); scanf("%d",&inquire_count); for(i=0;i

50、in_num,inquire_count)==0&&goods[i].num!=0) {printf("\n ----goods message----"); PRINTF1; PRINTF2; PRINTF3;} else j++; if(j==sum) printf("\n this goods is not exist!"); bioskey(0); } /*count goods message*/ count_message() { int choice; do { sy

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服