员工工资管理系统c语言编程The latest revision on November 22, 2020#include<>#include<>#include<>#include<>#define null 0typedef struct Info1{char num[10];char name[10];char depar[10];char yfsalary[10];char aband[10];char tax[10];char sfsalary[10];struct Info1 *next;}Info2;typedef struct Info1 *Info;Info head;void display();void find();void modify();void add();void del();void list();void listOne(Info s);Info isExists(char *num);void init();void init(){head=(Info)malloc(sizeof(Info2));head->next=null;}void main(){init();while(1){char c;display();scanf("%c",&c);switch(c){case '1':find();break;case '2':add();break;case '3':modify();break;case '4':del();break;case '5':list();break;case '6':printf("\t\t...退出系统!\n");return;default: printf("\t\t输入错误!请按任意键返回重新选择(1-7)\n");getchar();}}}void display(){printf("\n\t** 欢迎使用员工信息管理系统 **\n\n");printf("\t请选(1-7):\n");printf("\t============================================\n");printf("\t\t1.查询员工信息\n");printf("\t\t2.录入员工信息\n");printf("\t\t3.修改员工信息\n");printf("\t\t4.删除员工信息\n");printf("\t\t6.显示所有员工信息\n");printf("\t\t7.退出系统\n");printf("\t============================================\n");printf("\t您的选择是: ");}void listOne(Info p){printf("\n该员工信息记录如下: ");printf("\n===================================================== =====\n\n");printf("%-12s%-10s%-10s%-7s%-7s%-10s%-10s%\n","员工编号","姓名","部门","应付工资","保险","税金","实付工资");printf("%-12s%-10s%-10s%-7s%-7s%-10s%-10s%\n",p->num,p->name,p->depar,p->yfsalary,p->aband,p->tax,p->sfsalary);}Info isExists(char *num){Info p,q;p=head;q=p->next;while(q!=null){if(strcmp(q->num,num)==0)return p;p=q;q=p->next;}return p;}void add(){Info p,q;char num[10];q=(Info)malloc(sizeof(Info2));printf("\t\t请输入员工编号: ");scanf("%s",num);p=isExists(num);if (p->next==null){strcpy(q->num,num);printf("\t\t请输入员工姓名: ");scanf("%s",q->name);printf("\t\t请输入该员工的部门: ");scanf("%s",q->depar);printf("\t\t请输入该员工的应付工资金额: ");scanf("%s", q->yfsalary);printf("\t\t请输入该员工的保险金额: ");scanf("%s", q->aband);printf("\t\t请输入该员工的税金金额: ");scanf("%s",q->tax);printf("\t\t请输入该员工的实付工资: ");scanf("%s",q->sfsalary);q->next=null;p->next=q;}elseprintf("\n\t\t您所输入的员工编号以存在! ");printf("\n\t\t按任意键返回住菜单......");getchar();}void del(){Info p,q;char num[10];if (head->next==null){printf("\n\t\t当前还没有员工信息记录,按任意键返回主菜单......");getchar();return;}printf("\t\t请输入员工编号: ");scanf("%s",num);p=isExists(num);q=p->next;if (q!=null){q=q->next;p->next=q;printf("\n\t\t删除成功! ");}elseprintf("\n\t\t您所输入的员工编号有误或不存在! ");printf("\n\t\t按任意键返回主菜单......");getchar();}void modify(){Info p,q;char num[10];if (head->next==null){printf("\n\t\t当前还没有员工信息记录,按任意键返回主菜单......");getchar();return;}printf("\t\t请输入员工编号: ");scanf("%s",num);p=isExists(num);q=p->next;if(q!=null){listOne(q);printf("\t\t请输入该员工的新姓名: ");scanf("%s",q->name);printf("\t\t请输入该员工的部门: ");scanf("%s",q->depar);printf("\t\t请输入该员工的应付工资金额: ");scanf("%s",q->yfsalary);printf("\t\t请输入该员工的保险: ");scanf("%s",q->aband);printf("\t\t请输入该员工的新税金金额: ");scanf("%s",q->tax);printf("\t\t请输入该员工的新实付工资: ");scanf("%s",q->sfsalary);}elseprintf("\n\t\t您所输入的员工编号有误或不存在!");printf("\n\t\t按任意键返回主菜单......");getchar();}void list(){Info p;if (head->next==null){printf("\n\t\t当前还没有员工信息记录,按任意键返回主菜单......");getchar();return;}printf("\n所有员工信息记录如下: ");printf("\n===================================================== ===================\n\n");printf("%-12s%-10s%-10s%-7s%-7s%-10s%-10s%\n","员工编号","姓名","部门","应付工资","保险","税金","实付金额");p=head->next;while(p!=null){printf("%-12s%-10s%-10s%-7s%-7s%-10s%-10s%\n",p->num,p->name,p->depar,p->yfsalary,p->aband,p->tax,p->sfsalary);p=p->next;}printf("\n\t\t按任意键返回主菜单......");getchar();}void find(){Info p;char num[10];if (head->next==null){printf("\n\t\t当前还没有员工信息记录,按任意键返回主菜单......");getchar();return;}printf("\t\t输入员工编号: ");scanf("%s",num);p=isExists(num);p=p->next;if(p!=null)listOne(p);elseprintf("\n\t\t您所输入的员工信息有误或不存在!");printf("\n\t\t按任意键返回主菜单......");getchar();}。