资源描述:
《工资管理系统源码》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、XX单位工资管理系统#include#include#defineN100structmygz{intyuefen;floatyfgz;floatsf;floatdf;floatsj;floatsfgz;};structworker{intkahao;charxingming[20];structmygzm[12];floatzsfgz;};intygsm;structworkera[N];floatshuijin(floatm){floatshui1,shui2;
2、floattmp;shui1=0;shui2=0;if(m>=1400){shui1=(m-1400)*0.1;shui2=30;}else{if(m>=800&&m<1400){shui2=(m-800)*0.05;}}tmp=shui1+shui2;return(tmp);}floatshifagongzi(floata,floatb,floatc,floatd){floate=a-b-c-d;return(e);}voidduqu(){FILE*fp;if((fp=fopen("D:工资信息.tx
3、t","r"))==NULL){printf("无法读取文件");;return;}while(!feof(fp)){fread(&a[ygsm],sizeof(structworker),1,fp);ygsm++;}}voidchaxun(){intb;inti;intj;label_3:b=0;while(b!=1&&b!=2){printf("1,选择姓名查询.2,选择卡号查询.");scanf("%d",&b);}if(b==1){charc[20];printf("请输入您的姓名:
4、");scanf("%s",c);i=0;while(!(strcmp(a[i].xingming,c)==0)&&i5、.2f,税金:%7.2f,实发工资:%10.2f.",a[i].m[j].yuefen,a[i].m[j].yfgz,a[i].m[j].sf,a[i].m[j].df,a[i].m[j].sj,a[i].m[j].sfgz);}printf("总实发工资:%10f",a[i].zsfgz);b=0;while(b!=1&&b!=2){printf("1,继续查询.2,返回主菜单.");scanf("%d",&b);}if(b==1){gotolabel_3;}else{;return;
6、}}else{intd=0;while(!(d>=10001&&d<=32767)){printf("请输入您的卡号(五位数字),例如:10001");scanf("%d",&d);}i=0;while(a[i].kahao!=d&&i7、=NULL;j++){printf("月份:%5d,应发工资:%10.2f,水费:%7.2f,电费:%7.2f,税金:%7.2f,实发工资:%10.2f.",a[i].m[j].yuefen,a[i].m[j].yfgz,a[i].m[j].sf,a[i].m[j].df,a[i].m[j].sj,a[i].m[j].sfgz);}printf("总实发工资:%10f",a[i].zsfgz);b=0;while(b!=1&&b!=2){printf("1,继续查询.2,返回主菜单.")
8、;scanf("%d",&b);}if(b==1){gotolabel_3;}else{;return;}}}voidliulan(){structworkerx;intc;floatd;inti;intj;intk;for(i=0;ia[j].kahao){c=a[j].kahao;k=j;}}x=a[i];a[i]=a[k];a