200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > 超市系统c语言程序 超市管理系统-C语言

超市系统c语言程序 超市管理系统-C语言

时间:2018-12-17 23:10:23

相关推荐

超市系统c语言程序 超市管理系统-C语言

《超市管理系统-C语言》由会员分享,可在线阅读,更多相关《超市管理系统-C语言(35页珍藏版)》请在人人文库网上搜索。

1、西安邮电大学高级语言课程设计报告题 目: 超市管理系统院系名称: 理学院专业名称: 应用物理学班 级: 1301 学生姓名: 王松学号(8位): 0713指导教师: 王西龙设计起止时间:06月19日06月27日1:程序模型2:原函数概况1:创建函数void start(); /*启动界面*/void input(); /*商品数据信息输入函数*/void change(); /*商品数据信息修改函数*/void dele(); /*给定指定商品名称,删除商品信息*/void output(); /*商品信息输出*/void search(); /*商品信息查找*/v。

2、oid mima();/*密码程序*/void colour();/颜色选择void huanying();2:商品信息录入input()3:商品信息的修改Change()4:商品信息的删除Dele()5:商品信息的查询Seaerch()6:系统颜色选择Colour()7:退出系统3:详细设计过程1:结构体变量的定义struct MarketGoods /*存数商品信息的结构体*/ char goods_id30; /*商品编号*/ char goods_name30; /*商品名称*/double goods_price; /*商品价格*/double goods_discount;/*商品。

3、折扣*/int goods_amount;/*商品总数目*/int goods_remain;/*商品剩余数目*/goodsCOUNT;int count=0; /*全局变量,用于保存实际上有多少个商品*/2:欢迎界面void huanying()printf(t333333333333333333333333333333n);printf(t3 欢迎使用 3n);printf(t3 3n);printf(t3 3n);printf(t3 超市管理系统 3n);printf(t3 3n);printf(t3 3n);printf(t3 444444 3n);printf(t3 3n);prin。

4、tf(t3 555555555 3n);printf(t3 3n);printf(t3333333333333333333333333333333n);3:密码登陆void mima()/char pass6=1,2,3,4,5,6;/*假设密码长度是6*/ char pass=123456;/*假设密码长度是6*/ char str6,ch;int i=0;int flag=0;printf( 请输入密码:); fflush(stdin);for(i=0;i.);scanf(%d,&a);switch(a)case 1:system(color 40); break;case 2:syste。

5、m(color 70); break;case 3:system(color 04); break;case 4:system(color 21); break;case 5:system(color 65); break;case 6:system(color la); break;default:printf(nntttt输入无效);getch();colour();start();10:商品信息输出void output() /*数据输出*/ FILE *fp;int i,m=0;fp=fopen(e:/student.txt,rt);while(fread(&goodsm,sizeof。

6、(struct MarketGoods),1,fp)!=NULL)m+;fclose(fp);printf( 编号 名称 价格 折扣 总数目 剩余数目 n);for(i=0;i #include #include #include #define COUNT 30 /*声明商品的种类为30中*/#define N 30void start(); /*启动界面*/void input(); /*商品数据信息输入函数*/void change(); /*商品数据信息修改函数*/void dele(); /*给定指定商品名称,删除商品信息*/void output(); /*商品信息输出*/void。

7、 search(); /*商品信息查找*/void mima();/*密码程序*/void colour();/颜色选择void huanying();void paixu();struct MarketGoods /*存数商品信息的结构体*/ char goods_id30; /*商品编号*/ char goods_name30; /*商品名称*/double goods_price; /*商品价格*/double goods_discount;/*商品折扣*/int goods_amount;/*商品总数目*/int goods_remain;/*商品剩余数目*/goodsCOUNT;in。

8、t count=0; /*全局变量,用于保存实际上有多少个商品*/void main() /*主函数*/ huanying();mima();start(); void start() /*启动菜单*/int chi; printf( 超市商品管理系统n);printf( *n); printf( *n); printf( 1.商品信息录入:n);printf( 2.商品信息修改:n); printf( 3.商品信息删除:n); printf( 4.商品信息查找:n); printf( 5.系统颜色选择:n); printf( 6.商品信息输出:n); printf( 0.退出程序n);pri。

9、ntf( *n);printf( *n); printf( 输入你的选择: ); scanf(%d,&chi); /*根据你的选择执行相应的函数*/if(chi=1) input(); else if(chi=2) change();else if(chi=3) dele();else if(chi=4) search(); else if(chi=5) colour();else if(chi=6) output();else if(chi=0) printf(你已经退出超市商品管理系统!谢谢您的使用,再见n); exit(0);elseprintf( You Enter The Choic。

10、e Is Not valid ! n);getch();system(cls);start();void huanying()printf(t333333333333333333333333333333n);printf(t3 欢迎使用 3n);printf(t3 3n);printf(t3 3n);printf(t3 超市管理系统 3n);printf(t3 3n);printf(t3 3n);printf(t3 444444 3n);printf(t3 3n);printf(t3 555555555 3n);printf(t3 3n);printf(t3333333333333333333。

11、333333333333n);void mima()/char pass6=1,2,3,4,5,6;/*假设密码长度是6*/ char pass=123456;/*假设密码长度是6*/ char str6,ch;int i=0;int flag=0;printf( 请输入密码:); fflush(stdin);for(i=0;i.);scanf(%d,&a);switch(a)case 1:system(color 40); break;case 2:system(color 70); break;case 3:system(color 04); break;case 4:system(color 21); break;case 5:system(color 65); break;case 6:system(color la); break;default:printf(nntttt输入无效);getch(。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。