資源描述:
《管理系統(tǒng)c源程序》由會(huì)員上傳分享,免費(fèi)在線(xiàn)閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫(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ù)
2、組元素對(duì)應(yīng)一個(gè)職工工資信息intmain(){voidmenu();voidWrong();voidselect();voidinput();voidinquire();voidstats();voidsave();voidread();voidend();select();}voidmenu(){printf("********************工資管理系統(tǒng)********************");printf("**");printf("*1:信息輸入*");printf("*2:信息添加*
3、");printf("*3:信息瀏覽*");printf("*4:信息查詢(xún)*");printf("*5:信息統(tǒng)計(jì)*");printf("*6:信息保存*");printf("*7:信息讀入*");printf("*8:結(jié)束*");printf("****************************************************");}voidWrong(){printf("輸入錯(cuò)誤!");}voidselect(){voidinput();voidadd();void
4、scan();voidinquire();voidstats();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();b
5、reak;case8:end();break;default:Wrong();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].
6、init_salary);printf("水費(fèi):");scanf("%d",&si[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;stati
7、cintp=-1;p++;if(si[p].init_salary<=800)t=0;elseif(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].el
8、ectric_rate-t;printf("%d",t);printf("實(shí)發(fā)工資:");printf("%d",si[p].final_salary);}voidscan(){voidrank1();voidrank2();voidrank3();intw;printf("選擇瀏覽方式:(1:姓名2:卡號(hào)3