ImageVerifierCode 换一换
格式:DOCX , 页数:32 ,大小:49.05KB ,
资源ID:6842137      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

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

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

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(仓库管理系统c语言.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

仓库管理系统c语言.docx

1、仓库管理系统c语言仓库管理系统(c语言) 作者: 日期: 作品名称开发者:一、 系统背景:本软件能减轻对货物数目管理及价格盈亏等信息处理的工作量以便能快捷及时准确的调整货物的仓储量达到最合理化。可以使店主不失效率的节省大量精力用于其他方面 符合当今社会的商业形式而且本软件体积小操作简单是管理仓库的不二选择二、 系统简介:设计亮点:三级菜单使操作更简便明了密码操作能有效保证客户信息的安全性独特的dos命令调用使信息存储的实体属性为隐藏且无扩展名大大增大了安全系数数据结构为链表摆脱了数据数量的限制提供三种查看模式并会标出排名退出店主模式时会提示是否保存若选择yes着进行保存操作基本功能:在员工模式

2、下可输入卖出货物的名称和数目程序自动在后台进行一系列的操作新建数据并同时对其处理修改数据插入数据删除数据查找数据查看数据数据存档修改密码三、 系统结构图 #define LEN sizeof(struct shop)#include#include#include#includestruct shopchar name30;float price_in;float price_out;int num_in;int num_now;int num_sold;float win;float percent;struct shop *next;int n=0;void main(void)void

3、auto1(struct shop *h_p);int menu1(struct shop *h_p);void print1(void);void assistant(struct shop *head);int password(void);int menu2(struct shop *h_p);void print2(void);void creat(struct shop *h_p);void rewrite(struct shop *h_p);void insert(struct shop *h_p);void deleat(struct shop *h_p);void search

4、(struct shop *h_p);void printall(struct shop *h_p);void save(struct shop *head);void password_set(void);int password_exi(struct shop *h_p);int data_exi(struct shop *h_p);void load(struct shop *h_p);void save(struct shop *head);struct shop *addbuild(struct shop *h_p);void sort0(struct shop *h_p);int

5、search1(struct shop *h_p,char a30);void sort1(struct shop *h_p);void sort2(struct shop *h_p);void sort3(struct shop *h_p);void print3(void);void password_create(void);struct shop *addbuild(struct shop *h_p);int a;struct shop *head,*h_p;head=NULL;h_p=&head;auto1(h_p);doa=menu1(h_p);while(a!=3);system

6、(cls);printf(谢谢使用_);getch();int menu1(struct shop *h_p)int a,b;struct shop *head;head=*h_p;print1();scanf(%d,&a);putchar(n);getchar();doswitch(a)case 1:assistant(head);break;case 2:if(password()dob=menu2(h_p);while(b!=9);break;default:break;if(a!=3)system(cls);print1();scanf(%d,&a);while(a!=3);retur

7、n(a);int menu2(struct shop *h_p)int b;char a;struct shop *head;head=*h_p;print2();scanf(%d,&b);putchar(n);getchar();doswitch(b) case 1:creat(h_p);break;case 2:rewrite(h_p);break;case 3:insert(h_p);break;case 4:deleat(h_p);break;case 5:search(h_p);break;case 6:printall(h_p);break;case 7:head=*h_p;sav

8、e(head);break;case 8:password_set();break;default:break;if(b!=9)system(cls);print2();scanf(%d,&b);getchar();while(b!=9);printf(n保存吗?(y/n):);putchar(n);scanf(%c,&a);if(a=y)head=*h_p;save(head);return(b);void auto1(struct shop *h_p)if(password_exi(h_p) & data_exi(h_p)load(h_p);void print1(void)system(

9、cls);printf(*n);printf( 仓库管理系统 n);printf(*n);printf( n);printf( #* 菜单 *# n);printf( #| 1.员工模式 |# n);printf( #| 2.店主模式 |# n);printf( #| 3.退出 |# n);printf( #*# n);printf( n);printf(n请选择(1-3):);void assistant(struct shop *head)char a50,c=y;int b;struct shop *i;i=head;while(c=y)system(cls);printf(n请输入卖出

10、的商品名称:n);gets(a);putchar(n);printf(n请输入卖出的商品数量:n);scanf(%d,&b);putchar(n);while(strcmp(i-name,a)!=0&i-next!=NULL)i=i-next;if(i-next!=NULL)i-num_now-=b;i-win=(i-num_in-i-num_now)*(i-price_out-i-price_in);elseprintf(n此商品不存在或通知店主更新数据库n);printf(n继续吗?(y/n):);putchar(n);c=getchar();getchar();save(head);in

11、t password(void)FILE*fp;char a50,b50;int i;system(cls);fp=fopen(c:y_secrea,rb);fscanf(fp,%s,&a);fclose(fp);printf(请输入密码:n);putchar(n);i=0;dobi=getch();printf(*);i+;while(bi-1!=13&iname,0)=0)f=0;while(f)n+;if(n=1)head=j;f=1;printf(n请输入下一种货物的数据.nn);i=addbuild(&head);if(strcmp(i-name,0)=0)free(i);f=0;b

12、reak;j-next=i;j=i;j-next=NULL;*h_p=head;void rewrite(struct shop *h_p)char a30;struct shop *i,*j,*head;head=*h_p;i=head;doprintf(n请输入要修改货物的名称:);putchar(n);gets(a);if(n=1&!search1(h_p,a)printf(n不存在的货物名称!n);getch();if(head=NULL) goto end;while(n=1&!search1(h_p,a);while(strcmp(a,i-name)!=0&i-next!=NULL

13、)i=i-next; if(strcmp(a,i-name)=0) printf(n真的要修改吗??(y/n):); putchar(n); if(getchar()=y) getchar(); j=addbuild(h_p); strcpy(i-name,j-name);i-price_in=j-price_in;i-price_out=j-price_out;i-num_in=j-num_in;i-num_now=j-num_now;i-num_sold=j-num_sold;i-win=j-win;i-percent=j-percent; free(j); printf(n修改完成_nn

14、); end:;void insert(struct shop *h_p)struct shop *i,*j,*x,*head;head=*h_p;x=addbuild(h_p);i=j=head;while(strcmp(i-name,x-name)next!=NULL) j=i; i=i-next; if(strcmp(i-name,x-name)=0) if(i=head) head=x; else j-next=x; x-next=i; else i-next=x; x-next=NULL; printf(n插入完成_nn.);*h_p=head;void deleat(struct

15、shop *h_p)struct shop*i,*j,*head;char a30,b;head=*h_p;dosystem(cls);printf(n请输入你要删除的货物的名称:n);putchar(n);gets(a);if(n=1&!search1(h_p,a)printf(n不存在的货物名称!n);if(head=NULL) goto end;while(n=1&!search1(h_p,a);printf(n真的要删除吗?(y/n):);putchar(n);b=getchar();getchar();if(b=y)i=head;while(strcmp(i-name,a)!=0&i

16、-next!=NULL) j=i; i=i-next; if(strcmp(i-name,a)=0) if(i=head) head=i-next; free(i); else j-next=i-next; n-; printf(n删除完成_.nn); *h_p=head;end:;void search(struct shop *h_p)int begin,end,mid,t;char a30;struct shop *i,*head;head=*h_p;i=head;printf(n请输入要查询货物的名称:);putchar(n);gets(a);while(strcmp(i-name,a

17、)!=0)&i-next!=NULL)i=i-next;if(strcmp(i-name,a)=0)printf(n名称t进价t售价t进货数目 存货数目 销量 t赢利t利率n);printf(n=n);printf(%s%10.2f%10.2f%10d%10d%10d%9.2f%10.2f,i-name,i-price_in,i-price_out,i-num_in,i-num_now,i-num_sold,i-win,i-percent); elseprintf(n此货物不存在!n);getch();void printall(struct shop *h_p)int a,c; char b

18、=y;struct shop *i;while(b=y)dosystem(cls);print3();scanf(%d,&a);while(a!=1&a!=2&a!=3);switch(a)case 1:sort1(h_p);break;case 2:sort2(h_p);break;case 3:sort3(h_p);break;default:break;for(c=1,i=*h_p;i-next!=NULL;i=i-next,c+)printf(n名称t进价t售价t进货数目 存货数目 销量 t赢利t利率t排名n);printf(n=n);printf(%s%10.2f%10.2f%10d

19、%10d%10d%9.2f%10.2f%8d,i-name,i-price_in,i-price_out,i-num_in,i-num_now,i-num_sold,i-win,i-percent,c); if(c%8=0)getch();getchar();printf(按任意键继续。n);printf(n名称t进价t售价t进货数目 存货数目 销量 t赢利t利率t排名n);printf(n=n);printf(%s%10.2f%10.2f%10d%10d%10d%9.2f%10.2f%8d,i-name,i-price_in,i-price_out,i-num_in,i-num_now,i-

20、num_sold,i-win,i-percent,c); getch();getchar();system(cls);printf(查看其他排列方式?(y/n):);scanf(%c,&b);putchar(n);void save(struct shop *head)FILE *fp;struct shop *i;system(attrib c:y_data -h);system(del c:y_data);fp=fopen(c:y_data,wb+);i=head;for(i=head;i-next!=NULL;i=i-next)fprintf(fp,%s%7.2f,%.2f,%d,%d,

21、%d,%.2f,%.2f,i-name,i-price_in,i-price_out,i-num_in,i-num_now,i-num_sold,i-win,i-percent); fprintf(fp,%s%7.2f,%.2f,%d,%d,%d,%.2f,%.2f,i-name,i-price_in,i-price_out,i-num_in,i-num_now,i-num_sold,i-win,i-percent); fclose(fp);system(attrib c:y_data +h);printf(n_已保存n);void password_set()FILE *fp;int i,f

22、=0,t=0;char a20,b20;doif(password()dosystem(cls);printf(请输入新密码(319位):n);putchar(n);i=0;doai=getch();printf(*);i+;while(ai-1!=13&i19);ai-1=0;printf(n请确认新密码:n);putchar(n);i=0;dobi=getch();printf(*);i+;while(bi-1!=13&i2)t=1;system(attrib c:y_secrea -h);system(del c:y_secrea);fp=fopen(c:y_secrea,wb+);fprintf(fp,%s,a);fclose(fp

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1