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

开通VIP
 

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

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

开通VIP折扣优惠下载文档

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

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

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

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

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

注意事项

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

C语言仓库管理系统设计报告.docx

1、程序设计基础课程设计设计题目:仓库物资管理系统 班级:网络0901班姓名:水土第一 学号:20091221***完成日期:2010-9-9 考前须知:免积分下载,还请亲们给个好评。思密达 void find_l() ;//4. 1void find_2();//4. 2 void find_3();//4. 3void f ind_4();//4. 4 void f ind 5() ; //5. 1void f ind_6 () ; //5. 2 void find_7() ;//5.3void find_8() ;//5.4 void load」();//读 stu_list

2、l 中的数据void main () ( int i, j ; pr intf (z,what do you want to do?\nplease input the number according to the explaination. \nz,); for(i=l;i<12;i++)printf(/zif you input %d; then i t will work out the %d. \n/z, i, i); printf (/zIf you are first use it, please input 1, 2 or 3. \nNow please input

3、 the number:\n〃); scanf&j); swi tch (j) ( case l:scan_l();save_l();break;//I case 2:scan2();save_2();change_l();break;//2 case 3:scan_3();save_3();change_2();break;//3 case 4:find_l();break;//4. 1 case 5:f ind_2();break;//4. 2 case 6:find_3();break;//4. 3 case 7:f ind_4();break;//4. 4 cas

4、e 8:f ind 5 0;break;//5. 1 case 9:find_6();break;//5. 2 case 10:find_7();break;//5. 3 case 11:find_8();break;//5. 4 defaul t: printf (,,error\n/,); )} void scan」()〃输入库存{ int i ; printf ("'please input the information : \n/z); for(i=0;i

5、 [i]. brand, stu_l [i]. style, & stu_l[i]. num, &stu_l[i].money); )) void scan_2()〃输入入库信息( int i ; printf (〃请输入物资入库信息:\n〃); for(i=0;i

6、 year, &stu_2 [ i ]. time, month, &stu_2 [i]. time, day, stu_2 [i]. stuf);) void scan_3。〃输入出库信息 int i ; pr intf (〃请输入出库信息:\n〃); for(i=0;i

7、 time, month, &stu_3 [ i]. time, day, stu_3[i].stuf); ) for(i=0;istu_l[i].num) (printf (z,the error number, please input again\n〃);

8、 scanf (,,%s%s%s%d%d%d%d%s,,, stu_3 [ i ]. name, stu_3 [ i ]. brand, stu_3 [ i ]. s tyle, &stu_3 [i]. num, &stu_3 [i]. time, year, &stu_3 [i ]. time, month, &stu_3 [ i]. time, day, stu_3[i].stuf);) }) void save」。//将库存信息保存成文件{ FILE *fp; int i; if((fp=fopen(〃stu_ltxt",〃wb〃))二二NULL)printf ("conno

9、t open the file\n〃); return; ) for(i=0;i

10、turn; } for(i=0;i

11、 brand)==0&&strcmp(stu_l[i]. style,stu_2[iL style)==0)( stu_l[i].num=stu_l[i].num+stu_2[i].num;} } save_l ();} void save_3()〃将出库信息保存成文件{ FILE *fp; int i; if((fp=fopen(,,stu _list_3. txt〃,〃wb〃))==NULL) (pr intf ("connot open the f i 1 e\n,z); return; ) for(i=0;i

12、3[i], sizeof(struct exit), 1, fp)! = 1) pr intf (*f i le write error\n,/); } fclose (fp);void change_2。//出库时电器数量减少,并将信息加入库存文件 int i; load l (); for(i=0;i

13、e)==0)( stu 1[i].num=stu 1[i].num-stu 3[i].num;) ) save_l ();) FILE* open」。//翻开库存记录( FILE *fp; if((fp=fopen(^stu_list_l. txt〃,〃rb〃))二二NULL) (printf (^connot open the file!\n〃); return NULL; } return fp;) FILE* open_2 ()//翻开入库记录 FILE *fp; if ((fp=fopen (,zstu_l ist_2. txt”, 〃rb〃))二二NULL)

14、printf ("connot open the file!\n〃); return NULL; ) return fp;) FILE* open_3。//翻开出库记录{ FILE *fp; if((fp=fopen(,,stu list_3. txt", "rb"))二二NULL) (printf (^connot open the file!\n〃); return NULL; } return fp;) void find 1()〃完成4.1( FILE *fp=NULL; int i ; char name [ 10]; fp=open_l (); pr i

15、ntf ("please input the name : \n,z) ; //4. 1 scant("%s”, name); printf (zzthe information of the good : \nz,); for(i=0;i

16、 stu 1 [i]. brand, stu 1 [i].style,stu_l[i].num, stu_l[i]. money); )} ) fclose (fp);) void find_5()//完成5. 1( FILE *fp二NULL; int i ; int sum=0; char name [10]; fp=open_l (); pr intf (z/please input the name : \n〃); 〃5. 1 scanf(〃%s〃,name); pr intf (,/ the information of the good:\n〃); fo

17、r(i=0;i

18、''please input the brand : \n〃); 〃4. 2 scanf(〃%s〃,brand); fp=open_l (); for(i=0;i

19、i]. brand, stul [i ].style,stu_l[i].num, stu_1[i]. money);) ) } fclose (fp);} void find_3()〃完成4. 3( int i ; FILE *fp2=NULL, *fp3=NULL; int year,month,day; pr intf (,zplease input year, month, day, then find the exit and entrance:Xn^);//4.3 scanf ("%d%d%d”,&year, &month, &day); fp2=open_2()

20、 fp3=open 3(); pr intf (zzthe information of entrance is:\n〃); for (i=0;i

21、s %d %. 2f %d %d %d %s\n/z, stu2[i]. name, stu2[i]. b rand,stu 2[i].style,stu 2[i].num,stu 2[i]. money,stu _2[i].time.year, stu_2[i]. time, month, stu_2[i]. time, day, stu_2[i]. stuf);) ) } pr intf (/z the information of exit is:\n〃);课程设计目的和要求2 1.1 课程设计的目的:2 1.2 课程设计的要求:2课程设计任务内容:2 2 详细设计说明3

22、 2.1 功能模块图:3 2.2 数据结构设计:4 2.3 功能模块设计:5软件使用说明:6 3 课程设计心得与体会:6参考文献:7 4 附录:局部程序清单:7 for (i=0;i

23、 (z/%s %s %s %d %d %d %d %s\nz,, stu 3 [i]. name, stu 3 [i]. brand, stu_3[i]. style, stu_3[i]. num,stu_3[i].time.year,stu_3[i].time.month, stu_3[i]. time, day, stu_3[i]. stuf);) ) ) fc1ose(fp2); fclose (fp3);} void find_4()〃完成4. 4{ int i ; FILE *fp2=NULL,*fp3=NULL; char name[10],style[10];

24、pr intf (z,please i nput the name and style of the goods, then find the entrance and exit: \n,z) ; //4. 3 scanf(〃%s%s〃,name,style); fp2=open_2 (); fp3=open_3 0; pr intf (zzthe entrance information of the good is:\n〃); for (i=0;i

25、e), 1, fp2)==l)〃读出入 库信息{ if ((stremp (stu_2 [i]. name, name)) ==0&& (stremp (stu_2 [i]. style, style ))==0)//入库信息4. 4( pr intf (z,%s %s %s %d %f %d %d %d %s\n,z, stu_2[i]. name, stu_2[i]. bra nd, stu_2[iL style,stu_2[i].num,stu_2[i].money,stu_2[i].time.year,st u_2[i]. time, month, stu_2[i]. time,

26、day, stu_2[i]. stuf);) ) } pr intf (z,the ex i t information of the good is:\n〃); for(i=0;i

27、d %d %d %d %s\n/z, stu_3[i]. name, stu_3[i]. brand, stu_3 [i]. style, stu_3 [i]. num, stu_3 [i]. time, year, stu_3 [i]. time, month, stu_3[i]. time, day,stu_3[i].stuf);} ) ) fclose (fp2); fclose (fp3);) void find_6O〃完成5. 2( i n t i; int sum=0; FILE *fp=NULL; char name [10]; pr intf (/zplea

28、se input the name of the good, then output the number of its entrance : \ n/z) ; //5. 2 scanf("%s”, name); fp=open_2 (); for(i=0;i

29、 pr intf (zzthe number of the goods, entrance is %d. \n”, sum); fclose (fp);) void find_7()//完成5. 3( int i ; int sum=0; int year,month; FILE *fp=NULL; printf ("please input year and month,then output the number of exit in this month : \n,z) ; //5. 3 scanf&year,&month); fp=open_3 (); pr int

30、f (z/the number of exit good in this month is:〃); for(i=0;i

31、 i,j ; FILE *fp=NULL; pr intf (''please input the red number, then output all the informations of the goods:\n"); getchar (); scanf(〃%d〃,&j); fp=open 1 (); for(i=0;i

32、he information of the good are : \nz,); pr intf (,z%s %s %s %d %. 2f\n?z, stu_l [i]. name, stu_l[i]. brand, stu_l[i].style, stu l[i]. num, stu l[i].money); }} ) fclose (fp);) void load」()〃读stu」ist_l中的数据( FILE *fp=NULL; fp = open_l (); fread (stu_l, sizeof (struct goods), SIZE, fp); fclose (

33、fp);}附录资料:不需要的可以自行删除 Abstract: Based on the comprehensive analysis on the plastic part's structure service requirement, mounding quality and mould menu factoring cost. A corresponding injection mould of internal side core pulling was designed. By adopting the multi-direction and multi-combination c

34、ore-pulling. A corresponding injection mould of internal side core pulling was designed, the working process of the mould was introducedC语言详解-枚举类型 注:以下全部代码的执行环境为VC++ 6.0在程序中,可能需要为某些整数定义一个别名,我们可以利用预处理指令#define来完成 这项工作,您的代码可能是: #define MON I#define TUE 2 #define WED 3#define THU4 #define FRI5#defi

35、ne SAT6 #define SUN7在此,我们定义一种新的数据类型,希望它能完成同样的工作。这种新的数据类型叫枚 举型。 I.定义一种新的数据类型-枚举型 以下代码定义了这种新的数据类型一枚举型enum DAY { MON=1, TUE, WED, THU, FRI, SAT, SUN); (I)枚举型是一个集合,集合中的元素•(枚举成员)是一些命名的整型常量,元素之间用逗 号,隔开。 (2) DAY是一个标识符,可以看成这个集合的名字,是一个可•选项,即是可有可无的项。 (3)第一个枚举成员的默认值为整型的0,后续枚举成员的值在前一个成员上加lo(4)可以人为设定枚举成员

36、的值,从而自定义某个范围内的整数。 (5)枚举型是预处理指令#define的替代。 (6)类型定义以分号;结束。 2 .使用枚举类型对变量进行声明新的数据类型定义完成后,它就可以使用了。我们已经见过最基本的数据类型,如:整 型int,单精度浮点型float,双精度浮点型double,字符型char,短整型short等等。用这 些基本数据类型声明变量通常是这样: char a; 〃变量a的类型均为字符型charcharletter; intx,y, z; 〃变量x,y和z的类型均为整型intintnumber; double m, n;double result; 〃变量resul

37、t的类型为双精度浮点型double 既然枚举也是一种数据类型,那么它和基本数据类型一样也可以对变量进行声明。 方法一:枚举类型的定义和变量的声明分开cnuin DAY | MON=1, TUE, WED, THU, FRI, SAT, SUNI; enum DAY yesterday;enum DAY today; enum DAY tomorrow; 〃变量 tomorrow 的类型为枚举型 enum DAYenuin DAY good_day, bad_day;//变量 good_day 和 bad_day 的类型均为枚举型 enum DAY 方法二:类型定义与变量声明同时进行

38、 enum 〃跟第一个定义不同的是,此处的标号DAY省略,这是允许的。 Saturday, sunday = 0, mo nd ay, tuesday, Wednesday, thursday, friday} workday; 〃变量workday的类型为枚举型enum DAY enum week { Mon= 1, Tue, Wed, Thu, Fri Sat, Sun } days; 〃变量 days 的类型为枚举型 enum weekenum BOOLEAN { false, true } end_flag, match_flag; 〃定义枚举类型并声明了两个枚举 型变量 方

39、法三:用typedef关键字将枚举类型定义成别名,并利用该别名进行变量声明: typedef enuin workday {Saturday, sunday = 0, mo nd ay, tuesday, Wednesday, thursday, friday } workday; 〃此处的workday为枚举型enum workday的别名workday today, tomorrow; 〃变量 today 和 tomorrow 的类型为枚举型 workday,也即 enum workday enum workday 中的 workday 可以省略: typedef enum {Sat

40、urday, sunday = 0, monday, tuesday, Wednesday, thursday, friday } workday; 〃此处的workday为枚举型enum workday的别名 workday today, tomorrow; 〃变量 today 和 tomorrow 的类型为枚举型 workday,也即 enum workday也可以用这种方式: typedef enum workday Saturday, sunday = 0, mo nd ay, tuesday, Wednesday, thursday, friday workday

41、today, tomorrow; 〃变量 today 和 tomorrow 的类型为枚举型 workday,也即 enum workday注意:同一个程序中不能定义同名的枚举类型,不同的枚举类型中也不能存在同名的命 名常量。错误例如如下所示: 错误声明一:存在同名的枚举类型typedef enum | Wednesday, thursday, friday} workday; typedef enuin WEEK {Saturday, sunday = 0, monday, } workday;错误声明二:存在同名的枚举成员 typedef enum { Wednesday, i

42、hursday, friday } workday_l;typedef enum WEEK ( Wednesday, sunday = 0, monday, } workday_2;.使用枚举类型的变量 2.1 对枚举型的变量赋值。 实例将枚举类型的赋值与基本数据类型的赋值进行了比照: 方法一:先声明变量,再对变量赋值#include /*定义枚举类型*/enum DAY { MON=1, TUE, WED, THU, FRI, SAT, SUN }; void main() { /*使用基本数据类型声明变量,然后对变量赋值*/ int x, y, z;

43、 x = 10;1课程设计目的和要求 1.1 课程设计的目的: 通过一个学年的学习,对《C程序设计》这门课程之中所讲的知识有了一定的 了解。但是作为一名合格的大学生,不仅要认真阅读课本知识,还要通过上机 实践来增强和巩固自己的知识。特别是作为工科类学生,更要注重实践这一环 节。因为只有这样我们才能成为合格的计算机人材。 1.2 课程设计的要求: 在实践过程之中,重要的是独立思考,这样,不仅有利于提高自己对知识的理 解,还更有助于提高自己的实践动手能力。与此同时,还应该注意主动与别人 交流,这样便有利于就业之后与团队进行合作。 2课程设计任务内容: 仓库管理系统是各个大型商店进行管理

44、的重要组成局部,其内容较多,为了满 足工作需求,要求设计的管理系统能够完成以下五种功能: 1 .创立库存记录文件。根据提示输入假设干电器的“电器名称、品牌名称(或 生产厂家)、型号、库存数量、价值”等信息、,并将信息保存至一个文件中。 2 .物资入库管理,创立一个入库记录文件,每次有物资入库,那么按入库记 录要求输入“电器名称、品牌名称、型号、入库数量、单价、入库时间(年. 月.日)、送货人姓名”等信息,并将该次的入库信息添加到文件中,同时修 改相应的库存记录文件。 3 .物资出库管理,创立一个出库记录文件,每次有物资出库,那么按出库记 录要求输入各项信息,并将该次的出库信息添加到文件中

45、同时修改相应的库 存记录文件。在此过程之中,检查出库数量的合法性(即出库数量必须小于库 y = 20; z = 30;/*使用枚举类型声明变量,再对枚举型变量赋值*/ enum DAY yesterday, today, tomorrow; yesterday = MON; today = TUE; tomorrow = WED; printf("%d %d %d \n", yesterday, today, tomorrow);I 方法二:声明变量的同时赋初值#include /*定义枚举类型*/enum DAY { MON=1, TUE, WED, T

46、HU, FRI, SAT, SUN }; void main()( /*使用基本数据类型声明变量同时对变量赋初值*/ in( x=10, y=20, z=30;/*使用枚举类型声明变量同时对枚举型变量赋初值*/ enum DAY yesterday = MON, today = TUE, tomorrow = WED; printf("%d %d %d \n'\ yesterday, today, tomorrow);) 方法三:定义类型的同时声明变量,然后对变量赋值。 #includc /*定义枚举类型,同时声明该类型的三个变量,它们都为全局变量*/ enu

47、m DAY { MON=1, TUE, WED, THU, FRI, SAT, SUN } yesterday, today, tomorrow;/*定义三个具有基本数据类型的变量,它们都为全局变量*/ int x, y, z;void main() { /*对基本数据类型的变量赋值*/ x = 10; y = 20; z = 30; /*对枚举型的变量赋值*/ yesterday = MON; today = TUE; tomorrow = WED; printf("%d %d %d \n", x, y, z); 〃输出:10 20 30 printf("%d %d %d

48、 \n", yesterday, today, tomorrow); 〃输出:12 3 )方法四:类型定义,变量声明,赋初值同时进行。 #include /*定义枚举类型,同时声明该类型的三个变量,并赋初值。它们都为全局变量*/ enum DAY { MON=1, TUE, WED, THU, FRI, SAT, SUN} yesterday = MON, today = TUE, tomorrow = WED;/*定义三个具有基本数据类型的变量,并赋初值。它们都为全局变量*/ int x = 10, y = 20, z = 30;void main()

49、 printf("%d %d %d \n", x, y, z); 〃输出:10 20 30 printf("%d %d %d \n", yesterday, today, tomorrow); 〃输出:1 2 3| 1.2 对枚举型的变量赋整数值时,需要进行类型转换。 #include cnum DAY { MON=1, TUE, WED, THU, FRI, SAT, SUN }; void main()( enum DAY yesterday, today, tomorrow; yesterday = TUE; today = (enum DAY) (ye

50、sterday + 1); 〃类型转换 tomorrow = (enum DAY) 30; 〃类型转换 //tomorrow = 3; 〃错误 printf("%d %d %d \n", yesterday, today, tomorrow); 〃输出:2 3 30 I使用枚举型变量 #includeenum { BELL= '\a\ BACKSPACE = '\b', HTAB='\t', RETURN= '\r\ NEWLINE = '\n\ VTAB=*\v', SPACEenum BOOLEAN { FALSE = 0, TRUE } matc

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

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

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

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

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

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

客服