c语言销售管理系统12006.pdf
《c语言销售管理系统12006.pdf》由会员分享,可在线阅读,更多相关《c语言销售管理系统12006.pdf(23页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、 11.C2.3.4.C5.6.C7.;8.c21-4 1-5 123112(3123 4 34N-S:#inelude stdio.h,name4typedef struct int menu_select();/*/int enter(RECODE t);/*/void salor(RECODE t,int n);/*/int sum(RECODE t,int n,int m);/*/void list1(RECODE t,int n);/*/void list2(RECODE t,int n);/*/void list3(RECODE t,int n);/*/void save(RECO
2、DE t,int n);/*/int load(RECODE t);/*/#in cludepro.h 2.RECODEec600for(;)switch(menu_select()case 1:len gth=e nter(rec);breakprintf 07do while(c7)07return 3.scanfforti.num 4saveif if(fp=fope n(record.txt,wb)=NULL)printf(n n)fprintf fprintf(fp,%d,n)fprintf fprin tf(fp,rn)forfprintf fprin tf(fp,%-10d%-7
3、d%-7d%-7d%-7d-7d,ti.name,ti.a1,ti.a2,ti.a3,ti.a4,ti.a5)7fcloseprintf5.record.txt FILE*fpifif(fp=fope n(record.txt,rb)=NULL)printf(n)exitfscan f(fp,%d,&n)forfprin tf(fp,%-10d%-7d%-7d%-7d%-7d-7d,ti.name,ti.a1,ti.a2,ti.a3,ti.a4,ti.a5)fscan f(fp,%d%d%d%d%d%d,&(ti.name),&(ti.a1),&(ti.a2),&(ti.a3),&(ti.a4
4、),&(ti.a5)fclose(fp)printf 6.31).inti,j,sum0=0,sum1=0,sum2=0,sum3=0,sum4=0,sum5=0;int c4,b14=0,b24=0,b34=0,b44=0,b54=0 for for(i=0;i4;i+)for for(i=0;in;i+)for(j=0;j4;j+)forfor(i=0;i4;i+)printf sumsystem(cls)printf for2).scanf(%d,&s)printf forfor(i=0;in;i+),if(strcmp(name,ti.name)=0)in t c4,m4 forfor
5、(i=0;i4;i+)for(j=i+1;j4;j+)if prin tf(%dn,mi)3).ci=sum(t,n,i+1),forsumO+=ciforforprintf 51.=:Vt c-01Debu g01.eweF I?X 2.1 3.28 4.2 press any key to continue.NHXiM ENU KN 3 K K K 3WX X W K N iM K K 5.33 4 5 6 7 0-7P:T1*C+-bGlDebug01.exeF t-F:VS;4-4-01Debu g01 Exh 1 2 3 4 0 press ani/key to continue.6
6、.4 name product!ppoduct2 ppoduct3 pruduct4 produ 1 2 2 3:t 4 4 4 4 4 4 6 6 7 7 4 8 8 8 8 J|g iw of Sd L 1(1 reCOdB w M Hw press any key to continue.7.5 -*F:VtnC+4-01Debu c01,exe 8.3-R4-4-01Debu g01.exeF 3 nane product!product2 produet3 product4 product5 3 10 10 pres&enter to Continue.10 10 10 5 6 7
7、0 w END*S8.6 -F:C 4-4-DlDebu g01.ewe products code nun sum 36 40 50 68 18Q 8 10 12 36 key 10 12 36 8 10 12 36 8 10 12 36 ps um pre&s XKacKgMnitJtJtJtnjKJicxKKacgHHEJfJtJitKKXiMKKNiKigHHENll 3t:Kaaaa anij ta continue 0-?:9.71 2 6 0 0-?:seduce of salor salihg nuRber fI*DII mbfiy to few F:nC 4-4-01DebL
8、i g01.exe ny to continue 10.0 11.TXT 6cCcc6 0 1 2 3 any key to continue M;JC X X FND*:K XJOCSI sequce of salor salihg nunber fI*DII to few put any to continue 3!HENll*c:#in elude stdio.h/*#i nclude stdlib.h/*#include string.h/*#in elude ctype.h/*/*/*/*/typedef struct/*/int n ame;/*int a1;/*int a2;/*
9、int a3;/*int a4;/*int a5;/*RECODE;*/*/*/*/*/*/int menu_select();/*/int enter(RECODE t);/*/void salor(RECODE t,int n);/*/int sum(RECODE t,int n,int m);/*/void list1(RECODE t,int n);/*/void list2(RECODE t,int n);/*/void list3(RECODE t,int n);/*/void save(RECODE t,int n);/*/int load(RECODE t);/*/*/int
10、ma in()/*/*/RECODE rec600;int len gth;system(cls);/*/for(;)/*/switch(me nu _select()/*/case 1:le ngth=e nter(rec);break;case 2:save(rec,le ngth);break;case 3:le ngth=load(rec);break;case 4:list1(rec,le ngth);break;case 5:salor(rec,le ngth);break;case 6:list2(rec,le ngth);break;case 7:list3(rec,le ng
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 语言 销售 管理 系统 12006
限制150内