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.
zhigong123/职工工资管理系统终极末日版.cpp

470 lines
10 KiB

6 years ago
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<windows.h>
FILE *fp;//<2F>ļ<EFBFBD>ָ<EFBFBD><D6B8>
int i_entry=0;//ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD><CDB3>
#define MIN_C 100//ÿ<><C3BF><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD>Ӧ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD>ݵĴ<DDB5>С
#define MAX_G 1000//ְ<><D6B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>С
struct student {
char ID[MIN_C];//ְ<><D6B0>ѧ<EFBFBD><D1A7>
char name[MIN_C];//ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
char basesalary[MIN_C];//ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
char dutywage[MIN_C];//ְ<><D6B0>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
char postallowance[MIN_C];//ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
char accumulationfund[MIN_C];//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
char medicalinsurance[MIN_C];//ְ<><D6B0>ҽ<EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD>
int totalwage;//<2F>ܹ<EFBFBD><DCB9><EFBFBD>
}DATA[MAX_G];
struct student temp[1000];//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD>
struct student are;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void init();//<2F>ļ<EFBFBD><C4BC>ij<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void GREEN();//<2F><><EFBFBD><EFBFBD>̨<EFBFBD><CCA8>ɫΪ<C9AB><CEAA>ɫ
void RED();//<2F><><EFBFBD><EFBFBD>̨<EFBFBD><CCA8><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ɫΪ<C9AB><CEAA>ɫ
void LIGHT();//<2F><><EFBFBD><EFBFBD>̨<EFBFBD><CCA8><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ɫΪǿ<CEAA><C7BF>
void deal();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//dell()<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><E5BAAF>
void notice();//<2F><>ʾ<EFBFBD><CABE>Ϣ
void case1();//ְ<><D6B0><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD>Ϣ¼<CFA2><C2BC>
void entry();
void file_save();
void case2();//ְ<><D6B0><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
void i_printf();
void case3();//<2F>ۺ<EFBFBD><DBBA><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void ID_sort(int I,int L);
void name_sort(int I,int L);
void case4();//ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѯ
void ID_find();
void name_find();
void case5();//ְ<><D6B0><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD>Ϣ<EFBFBD>޸<EFBFBD>
void Change(int x);
void case6();//ְ<><D6B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ɾ<EFBFBD><C9BE>
int main()
{ GREEN();
printf(">********* <20><><EFBFBD><EFBFBD> ><<3C><>ӭʹ<D3AD><CAB9>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ϵͳ *********<\n");
printf(">******<2A>𾴵<EFBFBD><F0BEB4B5>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3AC><EFBFBD><EFBFBD>4<EFBFBD>δ<EFBFBD><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>ϵͳŶ\n");
int u=3;
char s[15];
while(u--)
{if(u==2)
printf("<EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ") ;
else
printf("<EFBFBD><EFBFBD><EFBFBD>ã<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
scanf("%s",s);
if(strcmp("123456789",s)==0)
{
break;
}
else
continue;
}
if(u==0)
{ GREEN();
printf(" <20><>****** <20><><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sorry\n");
return 0;
}
else
{
if((fp=fopen("student_data.txt","r+"))==NULL)
{
printf("FILE\n");
fp=fopen("student_data.txt","w+");
}
init();//<2F>ļ<EFBFBD><C4BC>ij<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
LIGHT();
printf("<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%d\n",i_entry);
GREEN();//<2F><><EFBFBD><EFBFBD>̨<EFBFBD><CCA8>ɫΪ<C9AB><CEAA>ɫ
printf(">********** <20><>ӭ<EFBFBD><D3AD>ʹ<EFBFBD><CAB9>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3>1.1<EFBFBD><EFBFBD> **********<\n");
printf(">********** <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD> **********<\n");
printf(">**********<2A><>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD>ȷ<EFBFBD>˳<EFBFBD><CBB3><EFBFBD><EFBFBD>򣬷<EFBFBD><F2A3ACB7><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>档**********<\n");
deal();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
fclose(fp);//<2F>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
return 0;
}}
void init() //<2F>ļ<EFBFBD><C4BC>ij<EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>ȡ
{
while (!feof(fp))
{
fscanf(fp, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",DATA[i_entry].ID, DATA[i_entry].name,DATA[i_entry].basesalary,
DATA[i_entry].dutywage, DATA[i_entry].postallowance, DATA[i_entry].medicalinsurance, DATA[i_entry].accumulationfund, DATA[i_entry].totalwage);
i_entry++;
}
}
void RED() {//<2F><><EFBFBD><EFBFBD>̨<EFBFBD><CCA8><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ɫΪ<C9AB><CEAA>ɫ
HANDLE kai_1 = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(kai_1, FOREGROUND_INTENSITY | FOREGROUND_RED); // Ϊ<><CEAA>ɫ
}
void GREEN() {//<2F><><EFBFBD><EFBFBD>̨<EFBFBD><CCA8><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ɫΪ<C9AB><CEAA>ɫ
HANDLE kai_2 = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(kai_2, FOREGROUND_INTENSITY | FOREGROUND_GREEN);// Ϊ<><CEAA>ɫ
}
void LIGHT(){
HANDLE kai_2 = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(kai_2, FOREGROUND_INTENSITY | FOREGROUND_INTENSITY);// Ϊǿ<CEAA><C7BF>
}
void deal() {//<2F><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int k,flag,p;
p=1;
notice();
flag=1;
while(flag) {
if(p>1)
{
system("cls");
notice();
}
scanf("%d",&k);
system("cls");
switch(k) {
case 0: {
puts("<EFBFBD><EFBFBD>ܰ<EFBFBD><EFBFBD><EFBFBD>ѣ<EFBFBD>");
puts("\t ^<5E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>^<5E><><EFBFBD><EFBFBD>^^лл<D0BB><D0BB><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>,<2C><>ӭ<EFBFBD>ٴ<EFBFBD>ʹ<EFBFBD><CAB9>!^^<5E><><EFBFBD><EFBFBD>^<5E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>^ ");
puts("\t*******ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD>ڵ<EFBFBD>ǰĿ¼<C4BF>ļ<EFBFBD> student_data.txt <20><>********");
flag=0;
LIGHT();
break;
}
case 1: {
case1();
break;
}
case 2: {
case2();
break;
}
case 3: {
case3();
break;
}
case 4: {
case4();
break;
}
case 5: {
case5();
break;
}
default: {
RED();
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD>\n");
GREEN();
break;
}
}
p=1103;
puts("\n");
}
}
void notice() {//<2F><>ʾ<EFBFBD><CABE>Ϣ
RED();
puts("\t\t\t1.ְ<><D6B0><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>");
puts("\t\t\t2.ְ<><D6B0><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD>Ϣ<EFBFBD><CFA2>ʾ");
puts("\t\t\t3.ְ<><D6B0><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD>Ϣͳ<CFA2><CDB3>");
puts("\t\t\t4.ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѯ");
puts("\t\t\t5.ְ<><D6B0><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD>Ϣ<EFBFBD>޸<EFBFBD>");
printf("\t\t\t0. <20><> <20><> ϵ ͳ\n");
GREEN();
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
}
//11111111111
void case1() {//ѧ<><D1A7><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD>Ϣ¼<CFA2><C2BC>
int flag;
flag=1;
while(flag) {
entry();
LIGHT();
printf("<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>1,<2C><><EFBFBD><EFBFBD>¼<EFBFBD>룻0,¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.<2E>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>");
GREEN();
scanf("%d",&flag);
i_entry++;
}
}
void entry() {//ְ<><D6B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>¼<EFBFBD><C2BC>
int flag,i;
system("cls");
init();
flag=1;
puts("***************>>>>>><3E><>ǰģʽΪְ<CEAA><D6B0><EFBFBD><EFBFBD>Ϣ¼<CFA2><C2BC>״̬<<<<<<*************");
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD>ID<EFBFBD>ţ<EFBFBD>");
flag=1;//<2F><>ʶ<EFBFBD><CAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϸ<D0B6><CFB8><EFBFBD>Ϣ<EFBFBD>Ƿ<EFBFBD><C7B7>Ѵ<EFBFBD><D1B4><EFBFBD>
scanf("%s",&DATA[i_entry].ID);
for(i=0; i<i_entry; i++) //<2F>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5><EFBFBD><EFBFBD>󣬼<EFBFBD><F3A3ACBC>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>Ѵ<EFBFBD><D1B4>ڸ<EFBFBD><DAB8><EFBFBD>Ϣ
if(strcmp(DATA[i].ID,DATA[i_entry].ID)==0) {
flag=0;
break;
}
if(flag==1) {
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
scanf("%s",DATA[i_entry].name);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>");
scanf("%s",DATA[i_entry].basesalary);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>");
scanf("%s",DATA[i_entry].dutywage);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
scanf("%s",DATA[i_entry].postallowance);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD>ҽ<EFBFBD>Ʊ<EFBFBD><EFBFBD>գ<EFBFBD>");
scanf("%s",DATA[i_entry].medicalinsurance);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
scanf("%s",DATA[i_entry].accumulationfund);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD>ܹ<EFBFBD><EFBFBD>ʣ<EFBFBD>");
scanf("%s",DATA[i_entry].totalwage);
file_save();
}
if(flag==0)
puts("<EFBFBD><EFBFBD>ID<EFBFBD>Ѿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
}
void file_save() {//<2F><>Ϣ<EFBFBD><CFA2><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ʽ¼<CABD><EFBFBD><EBBAAF>
fprintf(fp, "%s\t\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",DATA[i_entry].ID, DATA[i_entry].name,DATA[i_entry].basesalary,
DATA[i_entry].dutywage, DATA[i_entry].postallowance, DATA[i_entry].medicalinsurance, DATA[i_entry].accumulationfund, DATA[i_entry].totalwage);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><EFBFBD><EFBFBD>");
}
//2222222222222
void case2() {//ְ<><D6B0><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD>Ϣ<EFBFBD><CFA2>ʾ
puts("***************>>>>>><3E><>ǰģʽΪְ<CEAA><D6B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ʾ״̬<<<<<<*************");
i_printf();
}
void i_printf() {//ְ<><D6B0><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int i,k=1;
//printf("ID\t<><74><EFBFBD><EFBFBD>\t<><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\tְ<74><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<><74><EFBFBD><EFBFBD>\tҽ<74>Ʊ<EFBFBD><C6B1><EFBFBD>\t<><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\t<>ܹ<EFBFBD><DCB9><EFBFBD>");
printf("\n");
if(k)
{
for(i=0; i<i_entry; i++)
{
printf("ID<EFBFBD><EFBFBD>%-18s\n",&DATA[i].ID);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%-16s\n",DATA[i].name);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>%-4s\n",&DATA[i].basesalary);
printf("ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>%-6s\n",DATA[i].dutywage);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%-6s\n",&DATA[i].postallowance);
printf("ҽ<EFBFBD>Ʊ<EFBFBD><EFBFBD>գ<EFBFBD>%-6s\n",DATA[i].medicalinsurance);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%-6s\n",DATA[i].accumulationfund);
printf("<EFBFBD>ܹ<EFBFBD><EFBFBD>ʣ<EFBFBD>%-6s\n\n",DATA[i].totalwage);
}
LIGHT();
printf("<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><EFBFBD>밴0<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>س<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n");
scanf("%d",&k);
}
}
void case3()//ְ<><D6B0><EFBFBD><EFBFBD>Ϣͳ<CFA2><CDB3>
{
int z,a=0,b=0,c=0;
//p=emp;
for(z=0;z<i_entry;z++)
{
if(DATA[z].totalwage>3000)
{
a++;
continue;
}
if(DATA[z].totalwage>=2000&&DATA[z].totalwage<=3000)
{
b++;
continue;
}
if(DATA[z].totalwage<=2000&&DATA[z].totalwage>0)
{
c++;
continue;
}
}
printf(" <20>ܹ<EFBFBD><DCB9><EFBFBD><EFBFBD><EFBFBD>3000Ԫ<30><D4AA><EFBFBD>ϵ<EFBFBD>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD> %d\n\n",a);
printf(" <20>ܹ<EFBFBD><DCB9><EFBFBD><EFBFBD><EFBFBD>2000Ԫ<30><D4AA>3000Ԫ<30><D4AA>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>%d\n\n",b);
printf(" <20>ܹ<EFBFBD><DCB9><EFBFBD><EFBFBD><EFBFBD>2000Ԫ<30><D4AA><EFBFBD>µ<EFBFBD>ְ<EFBFBD><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD> %d\n\n",c);
//getchar();
}
//444444444444444
void case4() {//ְ<><D6B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѯ
int v;
LIGHT();
printf("<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>1,<2C><><EFBFBD><EFBFBD>ID<49><44>ѯ<EFBFBD><D1AF>2,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ.<2E><><EFBFBD><EFBFBD><EFBFBD>");
GREEN();
scanf("%d",&v);
if(v==1) {
ID_find();
}
if(v==2) {
name_find();
}
}
void ID_find() {//ID<49><44><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>strcmp()<29><><EFBFBD><EFBFBD>
int i,flag=0,k;
char wqs[MIN_C];
k=1;
system("cls");
puts("***************>>>>>><3E><>ǰģʽ<C4A3><CABD>ID<49><44>ѯ<EFBFBD><D1AF>Ϣ״̬<<<<<<*************");
while(k) {
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD>ID<EFBFBD><EFBFBD> ");
scanf("%s",wqs);
for(i=0; i<i_entry; i++)
if(strcmp(DATA[i].ID,wqs)==0)
{
printf("ID<EFBFBD><EFBFBD>%-18s\n",&DATA[i].ID);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%-16s\n",DATA[i].name);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>%-4s\n",&DATA[i].basesalary);
printf("ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>%-6s\n",DATA[i].dutywage);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%-12s\n",&DATA[i].postallowance);
printf("ҽ<EFBFBD>Ʊ<EFBFBD><EFBFBD>գ<EFBFBD>%-16s\n",DATA[i].medicalinsurance);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%-16s\n",DATA[i].accumulationfund);
printf("<EFBFBD>ܹ<EFBFBD><EFBFBD>ʣ<EFBFBD>%-15s\n\n",DATA[i].totalwage);
flag=1;
}
if(flag==0)
puts("δ<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.");
LIGHT();
puts("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
printf("\t\t1.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ\n\t\t0.<2E>˳<EFBFBD><CBB3><EFBFBD>ѯ\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
GREEN();
scanf("%d",&k);
}
}
void name_find() {//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ú<EFBFBD><C3BA><EFBFBD>strcmp()==0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int i,flag=0,k;
char wqs[MIN_C];
k=1;
system("cls");
puts("***************>>>>>><3E><>ǰģʽ<C4A3><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF>Ϣ״̬<<<<<<*************");
while(k) {
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ");
scanf("%s",wqs);
for(i=0; i<i_entry; i++)
if(strcmp(DATA[i].name,wqs)==0) {
printf("ID<EFBFBD><EFBFBD>%-18s\n",&DATA[i].ID);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%-16s\n",DATA[i].name);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>%-4s\n",&DATA[i].basesalary);
printf("ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>%-6s\n",DATA[i].dutywage);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%-12s\n",&DATA[i].postallowance);
printf("ҽ<EFBFBD>Ʊ<EFBFBD><EFBFBD>գ<EFBFBD>%-16s\n",DATA[i].medicalinsurance);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%-16s\n",DATA[i].accumulationfund);
printf("<EFBFBD>ܹ<EFBFBD><EFBFBD>ʣ<EFBFBD>%-15s\n\n",DATA[i].totalwage);
flag=1;
}
if(flag==0)
puts("δ<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.");
LIGHT();
puts("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
printf("\t\t1.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ\n\t\t0.<2E>˳<EFBFBD><CBB3><EFBFBD>ѯ\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:");
GREEN();
scanf("%d",&k);
}
}
//55555555555
void case5() {//ְ<><D6B0><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD>Ϣ<EFBFBD>޸<EFBFBD>
int flag,i,t;
system("cls");
puts("***************>>>>>><3E><>ǰģʽΪְ<CEAA><D6B0><EFBFBD><EFBFBD>Ϣ<EFBFBD>޸<EFBFBD>״̬<<<<<<*************");
LIGHT();
printf("ѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>1.ID<49><44><EFBFBD><EFBFBD>\t2.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD>");
GREEN();
flag=0;
scanf("%d",&t);
if(t==2) {
LIGHT();
init();
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>޸ĵ<EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
scanf("%s",&DATA[i_entry].name);
GREEN();
for(i=0; i<i_entry; i++) //<2F>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5><EFBFBD><EFBFBD><EFBFBD>
if(strcmp(DATA[i].name,DATA[i_entry].name)==0) {
flag=1;
break;
}
if(flag==1) {
Change(i);
}
if(flag==0)
puts("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
}
if(t==1) {
LIGHT();
init();
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>޸ĵ<EFBFBD>ְ<EFBFBD><EFBFBD>ID<EFBFBD><EFBFBD>");
scanf("%s",&DATA[i_entry].ID);
GREEN();
for(i=0; i<i_entry; i++) //<2F>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5><EFBFBD><EFBFBD><EFBFBD>
if(strcmp(DATA[i].ID,DATA[i_entry].ID)==0) {
flag=1;
break;
}
if(flag==1) {
Change(i);
}
if(flag==0)
puts("<EFBFBD><EFBFBD>ID<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
}
}
void Change(int x) {//ְ<><D6B0><EFBFBD><EFBFBD>Ϣ<EFBFBD>ĸ<EFBFBD><C4B8><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĺ<EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD>ID<EFBFBD><EFBFBD>");
scanf("%s",DATA[x].ID);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĺ<EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
scanf("%s",DATA[x].name);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĺ<EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>");
scanf("%s",DATA[x].basesalary);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĺ<EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʣ<EFBFBD>");
scanf("%s",DATA[x].dutywage);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĺ<EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
scanf("%s",DATA[x].postallowance);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĺ<EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD>ҽ<EFBFBD>Ʊ<EFBFBD><EFBFBD>գ<EFBFBD>");
scanf("%s",DATA[x].medicalinsurance);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĺ<EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
scanf("%s",DATA[x].accumulationfund);
printf("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸ĺ<EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD>ܹ<EFBFBD><EFBFBD>ʣ<EFBFBD>");
scanf("%s",DATA[x].totalwage);
puts("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɣ<EFBFBD>");
file_save();
}