You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
supermountain_12581/职工工资管理系统.c

331 lines
9.5 KiB

6 years ago
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define NUM 1000
void enter();
void search_num();
void dele_num();
void modi_num();
void browse();
void count();
void add();
void menu();
int n; //Ա<><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
struct emploee //ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD>ݽṹ
{
char no[5];
char name[8];
6 years ago
int wage1; //Ա<><D4B1><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int wage2; //Ա<><D4B1><EFBFBD><EFBFBD>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int funds; //Ա<><D4B1><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD><EFBFBD><EFBFBD>
int ylbx; //Ա<><D4B1><EFBFBD><EFBFBD>ҽ<EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD>
int jt; //Ա<><D4B1><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>
int wage3; //Ա<><D4B1><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int wage4; //ǰ3<C7B0><EFBFBD><EEB9A4>֮<EFBFBD><D6AE>
6 years ago
}emp[NUM],newemp;
int main()
{
menu();
}
void menu()//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{
int n;
do{
6 years ago
printf("**************** ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD>ϵͳ ***********\n");
6 years ago
printf("* 1-----<2D><><EFBFBD><EFBFBD>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>Ϣ------ *\n");
printf("* 2-----<2D><>ѯְ<D1AF><D6B0><EFBFBD><EFBFBD>Ϣ------ *\n");
6 years ago
printf("* 3-----ɾ<><C9BE>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>Ϣ------ *\n");
printf("* 4-----<2D>޸<EFBFBD>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>Ϣ------ *\n");
printf("* 5-----<2D><><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3><EFBFBD><EFBFBD>Ϣ------ *\n");
printf("* 6-----<2D><><EFBFBD><EFBFBD>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>Ϣ------ *\n");
printf("* 7-----<2D><><EFBFBD><EFBFBD>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>Ϣ------ *\n");
printf("* 8-------<2D>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>-------- *\n");
6 years ago
printf("*********************************************\n");
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1-8<><38>:");
6 years ago
scanf("%d",&n);
switch(n)
{
case 1:enter(); break;
case 2:search_num(); break;
case 3:dele_num(); break;
case 4:modi_num(); break;
case 5:count(); break;
6 years ago
case 6:browse(); break;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
case 7:add(); break;
case 8:printf("*******<2A><>ӭ<EFBFBD>´<EFBFBD>ʹ<EFBFBD>ã<EFBFBD>*******");
6 years ago
default:exit(0);//<2F>˳<EFBFBD>ϵͳ.exit(0)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>
}
}while(n!=0);
}
6 years ago
/*************************<2A><><EFBFBD><EFBFBD>**********************/
6 years ago
void enter()
{
FILE *fp;
int n,i;
6 years ago
fp=fopen("emp.txt","ab+");
if(fp==NULL)
{
6 years ago
if ((fp=fopen("emp.txt","wb"))==NULL)
{
printf("<EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><EFBFBD><EFBFBD>emp<EFBFBD>ļ<EFBFBD>\n");
exit(1);
}
6 years ago
}
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%d",&n);
for(i=0;i<n;i++) /* ѭ<><D1AD><EFBFBD><EFBFBD>ȡn<C8A1><6E>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>¼ */
{
printf("<EFBFBD><EFBFBD>%d<><64>ְ<EFBFBD><D6B0>:\n",i+1);
printf("ID:");
scanf("%s",emp[i].no);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%s",&emp[i].name);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%d",&emp[i].wage1);
6 years ago
printf("ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%d",&emp[i].wage2);
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%d",&emp[i].jt);
6 years ago
printf("ҽ<EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%d",&emp[i].ylbx);
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%d",&emp[i].funds);
6 years ago
emp[i].wage3=emp[i].wage1+emp[i].wage2-emp[i].ylbx+emp[i].jt-emp[i].funds;
6 years ago
emp[i].wage4=emp[i].wage1+emp[i].wage2+emp[i].jt;
6 years ago
}
for(i=0;i<n;i++) /*<2A><>n<EFBFBD><6E>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>¼д<C2BC><D0B4><EFBFBD>ļ<EFBFBD>*/
fwrite(&emp[i],sizeof(struct emploee),1,fp);
fclose(fp);
}
/*************************ͳ<><CDB3><EFBFBD><EFBFBD>Ϣ**********************/
void count()
{
FILE *fp;
6 years ago
int n,i;
int a=0,b=0,c=0;
6 years ago
if((fp=fopen("emp.txt","rb"))==NULL)
{
printf("<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD>emp<EFBFBD>ļ<EFBFBD>\n");
exit(1);
6 years ago
}
6 years ago
for(n=0;fread(&emp[n],sizeof(struct emploee),1,fp)!=0;n++)
{
6 years ago
if(emp[n].wage4>=1000&&emp[i].wage4<2000)
{
a++;
}
if(emp[n].wage4>=2000&&emp[i].wage4<3000)
{
b++;
}
if(emp[n].wage4>=3000)
{
c++;
6 years ago
}
6 years ago
}
printf("ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD>1000~2000Ԫ<30><D4AA>ռ<EFBFBD>İٷ<C4B0>֮%d\n",a*100/n);
printf("ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD>2000~3000Ԫ<30><D4AA>ռ<EFBFBD>İٷ<C4B0>֮%d\n",b*100/n);
printf("ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><EFBFBD><EFBFBD><EFBFBD>3000Ԫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD>İٷ<EFBFBD>֮%d\n",c*100/n);
6 years ago
fclose(fp);
}
/********************ɾ<><C9BE><EFBFBD><EFBFBD>Ϣ<EFBFBD>ĵط<C4B5>*******************/
void dele_num()
{
FILE *fp;
int i,j,n;
char num[5];
if((fp=fopen("emp.txt","rb"))==NULL)
{
printf("<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD>emp<EFBFBD>ļ<EFBFBD>\n");
exit(1);
}
6 years ago
printf("ID <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ҽ<>Ʊ<EFBFBD><C6B1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
6 years ago
for(n=0;fread(&emp[n],sizeof(struct emploee),1,fp);n++)
{
printf("ID:");
6 years ago
scanf("%-6s",emp[i].no);
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-6s",&emp[i].name);
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].wage1);
6 years ago
printf("ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].wage2);
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].jt);
6 years ago
printf("ҽ<EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].ylbx);
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].funds);
6 years ago
printf("<EFBFBD>ܹ<EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].wage3);
6 years ago
}/*nΪemp<6D>ļ<EFBFBD><C4BC>м<EFBFBD>¼<EFBFBD><C2BC>*/
6 years ago
printf("Ҫɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID:");
6 years ago
scanf("%s",num);
for(i=0;(strcmp(emp[i].no,num)!=0&&i<n);i++)
if(i>=n)
{
printf("\tû<EFBFBD><EFBFBD>%sְ<73><D6B0><EFBFBD>ŵ<EFBFBD>ְ<EFBFBD><D6B0>\n",num);
6 years ago
return;
6 years ago
}
fclose(fp);
fp=fopen("emp.dat","w+");
if(n==1) /*һ<><D2BB><EFBFBD><EFBFBD>¼<EFBFBD>Ѿ<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>*/
{
fclose(fp);
exit(3);
}
for(j=0;j<i;j++)
fwrite(&emp[j],sizeof(struct emploee),1,fp);
for(j=i+1;j<n;j++)
fwrite(&emp[j],sizeof(struct emploee),1,fp);
printf("ɾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\n");
fseek(fp,0,SEEK_SET);
for(i=0;fread(&emp[i],sizeof(struct emploee),1,fp);i++)
{
printf("ID:");
6 years ago
scanf("%-6s",emp[i].no);
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-6s",&emp[i].name);
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].wage1);
6 years ago
printf("ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].wage2);
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].jt);
6 years ago
printf("ҽ<EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].ylbx);
6 years ago
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].funds);
6 years ago
printf("<EFBFBD>ܹ<EFBFBD><EFBFBD><EFBFBD>:");
6 years ago
scanf("%-8d",&emp[i].wage3);
6 years ago
}
fclose(fp);
}
/********************<2A>޸<EFBFBD><DEB8><EFBFBD>Ϣ<EFBFBD>ĵط<C4B5>*******************/
void modi_num()
{
FILE *fp;
int i,j;
char num[5];
if((fp=fopen("emp.txt","rb+"))==NULL)
{
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>emp<6D>ļ<EFBFBD>\n");
exit(1);
}
6 years ago
printf("Ҫ<EFBFBD>޸ĵ<EFBFBD>ID:");
6 years ago
scanf("%s",num);
for(i=0;fread(&emp[i],sizeof(struct emploee),1,fp);i++)
if(!strcmp(emp[i].no,num))break;
if(feof(fp))
{
printf("\tû<EFBFBD><EFBFBD>%sְ<73><D6B0><EFBFBD>ŵ<EFBFBD>ְ<EFBFBD><D6B0>\n",num);
6 years ago
return;
6 years ago
}
6 years ago
printf("ID <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ҽ<>Ʊ<EFBFBD><C6B1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
printf(" %-6s %-6s %-8d %-8d %-8d %-8d %-8d %-8d\n",emp[i].no,emp[i].name,emp[i].wage1,emp[i].wage2,emp[i].jt,emp[i].ylbx,emp[i].funds,emp[i].wage3);
printf("ID <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ҽ<>Ʊ<EFBFBD><C6B1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%s%s%d%d%d%d%d",newemp.no,newemp.name,&newemp.wage1,&newemp.wage2,&newemp.jt,&newemp.ylbx,&newemp.funds);//<2F><>ȡ<EFBFBD>µ<EFBFBD>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>¼
6 years ago
newemp.wage3=newemp.wage1+newemp.wage2+newemp.jt-newemp.ylbx-newemp.funds;
fseek(fp,-(long)sizeof(struct emploee),SEEK_CUR); //<2F>ļ<EFBFBD>ָ<EFBFBD><D6B8>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD>޸ĵļ<C4B5>¼<EFBFBD><C2BC>ͷ
fwrite(&newemp,sizeof(struct emploee),1,fp); //<2F><>newemp<6D><70><EFBFBD>ǵ<EFBFBD>ǰ<EFBFBD><C7B0>¼
printf(" <20>޸ĺ<DEB8>:\n");
fseek(fp,0,SEEK_SET); //<2F><>ʾ<EFBFBD>޸ĺ<DEB8><C4BA><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
6 years ago
printf("ID <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ҽ<>Ʊ<EFBFBD><C6B1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
6 years ago
for(i=0;fread(&emp[i],sizeof(struct emploee),1,fp)!=0;i++)
6 years ago
printf(" %-6s %-6s %-8d %-8d %-8d %-8d %-8d %-8d\n",emp[i].no,emp[i].name,emp[i].wage1,emp[i].wage2,emp[i].jt,emp[i].ylbx,emp[i].funds,emp[i].wage3);
6 years ago
fclose(fp);
}
/*************************<2A><>ѯ<EFBFBD><D1AF>Ϣ<EFBFBD>ĵط<C4B5>***********************/
void search_num()
{
FILE *fp;
6 years ago
int i,n;
6 years ago
char num[5];
if((fp=fopen("emp.txt","rb"))==NULL)
{
printf("<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD>emp<EFBFBD>ļ<EFBFBD>\n");
exit(1);
}
printf("Ҫ<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%s",num);
for(i=0;fread(&emp[i],sizeof(struct emploee),1,fp);i++)
if(!strcmp(emp[i].no,num)) break;
if(feof(fp))
{
printf("\t<EFBFBD><EFBFBD><EFBFBD>޴<EFBFBD><EFBFBD><EFBFBD>\n");
6 years ago
return;
6 years ago
}
6 years ago
printf("ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ҽ<>Ʊ<EFBFBD><C6B1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
printf(" %-6s %-6s %-8d %-8d %-8d %-8d %-8d %-8d\n",emp[i].no,emp[i].name,emp[i].wage1,emp[i].wage2,emp[i].jt,emp[i].ylbx,emp[i].funds,emp[i].wage3);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>밴1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>밴0\n");
scanf("%d",&n);
switch(n)
{
case 1:search_num();break;
case 0:break;
default:break;
}
6 years ago
fclose(fp);
}
/*******************<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ĵط<C4B5>********************/
void browse()
{ int i;
FILE *fp;
if((fp=fopen("emp.txt","r"))==NULL)
{
printf("<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD>emp<EFBFBD>ļ<EFBFBD>\n");
exit(0);
}
printf("<EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD> ְ<><D6B0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ҽ<>Ʊ<EFBFBD><C6B1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
for(i=0;fread(&emp[i],sizeof(struct emploee),1,fp)!=0;i++)
{
6 years ago
printf("%-6d %-6s %-6s %-8d %-8d %-8d %-8d %-8d %-8d\n",i+1,emp[i].no,emp[i].name,emp[i].wage1,emp[i].wage2,emp[i].jt,emp[i].ylbx,emp[i].funds,emp[i].wage3);
6 years ago
}
fclose(fp);
}
6 years ago
/******************<2A>޸<EFBFBD><DEB8><EFBFBD>Ϣ<EFBFBD>ĵط<C4B5>*******************/
6 years ago
void add()
{
FILE *fp;
6 years ago
int n,i,t;
6 years ago
if((fp=fopen("emp.txt","ab+"))==NULL)
{
printf("<EFBFBD><EFBFBD><EFBFBD>ܴ<EFBFBD><EFBFBD><EFBFBD>emp<EFBFBD>ļ<EFBFBD>\n");
exit(0);
}
printf("Ҫ׷<EFBFBD>ӵ<EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%d",&n);
6 years ago
for(i=0;i<n;i++) /* ѭ<><D1AD><EFBFBD><EFBFBD>ȡn<C8A1><6E>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>¼ */
{
printf("<EFBFBD><EFBFBD>%d<><64>ְ<EFBFBD><D6B0>:\n",i+1);
printf("ID:");
scanf("%s",emp[i].no);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%s",&emp[i].name);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%d",&emp[i].wage1);
printf("ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%d",&emp[i].wage2);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%d",&emp[i].jt);
printf("ҽ<EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD>:");
scanf("%d",&emp[i].ylbx);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
scanf("%d",&emp[i].funds);
emp[i].wage3=emp[i].wage1+emp[i].wage2-emp[i].ylbx+emp[i].jt-emp[i].funds;
}
for(i=0;i<n;i++) /*<2A><>n<EFBFBD><6E>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>¼д<C2BC><D0B4><EFBFBD>ļ<EFBFBD>*/
fwrite(&emp[i],sizeof(struct emploee),1,fp);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>밴1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>밴0\n");
scanf("%d",&t);
switch(t)
{
case 1:add();break;
case 0:break;
default:break;
}
6 years ago
fclose(fp);
}