資源描述:
《管理系統(tǒng)C源程序.doc》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫(kù)。
1、#include#include#include#include#definemax10structsalary_Info{intcard_no;//工資卡號(hào)charname[20];//姓名intmonth;//月份intinit_salary;//應(yīng)發(fā)工資intwater_rate;//水費(fèi)intelectric_rate;//電費(fèi)inttax;//稅金intfinal_salary;//實(shí)發(fā)工資}si[max];//SI[MAX]中每個(gè)數(shù)組元素對(duì)應(yīng)一個(gè)職
2、工工資信息intmain(){voidmenu();voidWrong();voidselect();voidinput();voidinquire();voidstats();voidsave();voidread();voidend();select();}voidmenu(){printf("********************工資管理系統(tǒng)********************");printf("**");printf("*1:信息輸入*");printf("*2:信息添加*");printf("*3:信息
3、瀏覽*");printf("*4:信息查詢*");printf("*5:信息統(tǒng)計(jì)*");printf("*6:信息保存*");printf("*7:信息讀入*");printf("*8:結(jié)束*");printf("****************************************************");}voidWrong(){printf("輸入錯(cuò)誤!");}voidselect(){voidinput();voidadd();voidscan();voidinquire();voi
4、dstats();voidsave();voidread();voidend();intchoose;system("cls");menu();scanf("%d",&choose);switch(choose){case1:input();break;case2:add();break;case3:scan();break;case4:inquire();break;case5:stats();break;case6:save();break;case7:read();break;case8:end();break;default:W
5、rong();break;}}voidinput(){voidtaxes();intq;staticinti=-1;system("cls");a:i++;printf("工資卡號(hào):");scanf("%d",&si[i].card_no);printf("姓名:");scanf("%s",si[i].name);printf("月份:");scanf("%d",&si[i].month);printf("應(yīng)發(fā)工資:");scanf("%d",&si[i].init_salary);printf("水費(fèi):");scanf("%d",&s
6、i[i].water_rate);printf("電費(fèi):");scanf("%d",&si[i].electric_rate);printf("稅金:");taxes();printf("是否繼續(xù):(1:繼續(xù)2:返回)");scanf("%d",&q);if(q==1){gotoa;}else(q==2);{system("cls");select();}}voidadd(){input();}voidtaxes(){intt;staticintp=-1;p++;if(si[p].init_salary<=800)t=0;elsei
7、f(si[p].init_salary>800&&si[p].init_salary<=1400)t=(si[p].init_salary-800)*0.05;elseif(si[p].init_salary>1400)t=(si[p].init_salary-1400)*0.1;si[p].tax=t;si[p].final_salary=si[p].init_salary-si[p].water_rate-si[p].electric_rate-t;printf("%d",t);printf("實(shí)發(fā)工資:");printf("%
8、d",si[p].final_salary);}voidscan(){voidrank1();voidrank2();voidrank3();intw;printf("選擇瀏覽方式:(1:姓名2:卡號(hào)3