年龄职工信息包括职工号;要求提供以下功能、职工号等查询
5、姓名、职工信息录入功能(职工信息用文件保存)(输入)
3: 按学历、学历,查询方式、工资、职工信息查询功能(算法)、性别、职工信息浏览功能(输出)
4、系统以菜单方式工作
2:
1、电话等(职工号不重复)、住址、职工信息删除
求一个职工信息管理系统的C语言程序,急!!!~~
答案:1 悬赏:50
解决时间 2021-02-20 23:20
- 提问者网友:斩断情丝
- 2021-02-20 19:43
最佳答案
- 二级知识专家网友:不傲怎称霸
- 2021-02-20 21:17
请先建立学生信息;
printf(",p->. 退 出;
printlist(head);
else
save(head);
scanf("
}
printf(";);
scanf("
while(p&&q->
scanf("n"n 2;输入学号;
xuanze=getchar(),&inew->%ld");输入你想添加的学生的学号;score[1]);%f"
}
inew=(Stu *)malloc(sizeof(Stu));num;%s"6'););
thead = thead->;
printf(".2f "n"
getchar():
if(head==NULL) printf("\,&inew->num = a;);
printf("n\n"
}
if(p==NULL)
printf("
system(":"n":"
}
void printlist(Stu *head)
{
Stu *p=head->
struct student *next;
case ':
printf(";
typedef struct student
{
long num!\
printf("shengri);%d"
scanf("
getchar():"
scanf("
scanf("),(p->);
#include
scanf("n按回车键返回主菜单 ".day),&(inew->.day;
scanf(");
scanf("n 按回车键返回主菜单;
}
printf("
system("
p=p->
printf("n". 删 除 某 个 学 号 的 学 生\
getchar();n"n\next =inew;shengri);年;);
}
void insert(Stu *head;请先建立学生信息;cls"n 6:"
while (1)
{
menu();n 5;
printlist(head):
if(head==NULL) printf("
}
while(p&&p->
while(a>a)
{
pf=p;cls",&n);n 7;);;);
printf("输入姓名:
if(head==NULL) printf(":",&a);您输入的学号已经存在:
if(head==NULL) printf("
case 'next;输入学号;name):
exit(0); \,p->:"
p = p->).2f %5;);next =NULL;
printlist(head);n\
}Stu:\);
scanf("n"next = p->,p->
printf("),p->
if(p==NULL)
printf(".h>cls"next = cnew;num==a)
{
printf(",p->next,
(p->!=NULL)
{
printf("输入你想删除的学生的学号,");请先建立学生信息;0)
{
p = head->#include你还没有输入学生信息;
scanf("
Stu *head;
printlist(head);n\
}
return head;
struct date
{
int year;
long int n!p) printf(",&(cnew->););
else
{
fp=fopen("name;输入成绩2;);学生信息已经为空;
p=head->\ \shengri);;),*pf:"该学号已经存在;score[1]);
p = head->)!\;
cnew->,&inew->
system("
p = head->
printf("
printf("next;;%6ld %6s %4d %2d %2d %4;
inew->
thead = head->%d".h>
clast = head,请先输入\
printf(");next;
pf->
if(p==NULL)
printf("n 选择错误:
if(head==NULL) printf("
void menu()
{
printf(",p->.txt中\n"
case 'score[0]);
getchar():";);
while(thead)
{
q = thead;
insert(head;n"next = q!"\);
printf(");
}
}
void sort(Stu * head)
{
Stu *thead;);
break;%f",&(inew->
printf("
pf = head;
break;
printf(");
}
fclose(fp););
}
}
}
void save(Stu *head)
{
FILE *fp,&(cnew->
Stu *p;;);;
inew->
printf("
while(p&&p->%6ld %4s %2d %2d %2d %5;
system("
};
head->name);;;%d"输入成绩3:\;next,按回车返回主菜单\输入成绩1;
system("
else
{
while(p)
{
fprintf(fp,(p->next;cls":"n"n\next = NULL;next;); 请选择,&a);
printf("student;
printf("
if(;
p=p->.day;月;next:"score[1].month;)!=n)
{
pf=p;score[2]):\现在没有学生信息;
case '
p = head->输入成绩3;
int month;n"3'. 新 建 并 录 入 学 生 信 息 \输入成绩1;%f"该学生的信息已经被删除,n);n ************************************功 能 键***********************************\;n 按回车键返回主菜单;学 号 姓 名 出 生 日 期 成绩1 成绩2 成绩3\,&cnew->,&cnew->
}
printf(" \\ \a").",n);
scanf(");next;
}
printf("score[2]);
while(p)
{
if(p->,&(inew->日.year););next = pf->n\);
else
{
sort(head).1f %4;
Stu *p;);\next,*pf;
}
void del(Stu *head:
head = createlist().month),p->
}
cnew = (Stu *)malloc(sizeof(Stu));月;日;1'
default;
#include<4',"num==a)
{
printf("stdlib;),p->num>
break;
p=p->shengri););next = pf->. 存 储 入 学 生 信 息 \);请先建立学生信息;输入成绩2;score[1],*q;
getchar();cls"););
scanf("n"
case 'cls":",请重新输入学号;n 3;
pf->);
printf("
struct date shengri;);
break;);%f"
head->next,请先输入学生信息\
if(;;n\cls"
else
{
printf(";输入出生日期;
getchar();;score[2]);n",*clast;n\,long n)
{
Stu *pf,请重新输入学号;
free(p)."%d"
float score[3]; \shengri)."
system(" \
pf=head;
break;);:"n 1;n\.month);
head = (Stu *)malloc(sizeof(Stu))!\shengri):"
switch(xuanze)
{
case 'next.month;%d"
else
{
pf->
clast = clast->:",&cnew->);
printf("shengri);\请先建立学生信息;
case 'n"\,(p->n"shengri). 插 入 新 的 学 生 信 息 \);shengri),&(cnew->.h>
system(": scanf(");n"
printf("shengri);
printf("!fp)
printf("num;
cnew->
printf("num)
{
pf = pf->,*p;
char name[20]!\shengri)!\
while(p;
scanf(",long a)
{
Stu *p;
else
{
printf(");n 按回车键返回主菜单,&n);
getchar();\,&a);n 4;
del(head;);next;
getchar();).year;num;
printf("
scanf("
}
}
int main()
{
char xuanze;%d".2f %5;n"next;);n\文件不存在\,
(p->n\
printf("
scanf("score[2]);n"输入出生日期:"
scanf("
break,inew->);next;%f");next;
getchar();;n 按回车键返回主菜单:"n"
pf = head;);;
p=p->
getchar();score[0])."!\next;next = NULL;
int day;n 按回车键返回主菜单;
}
printf(",*p;%ld"
printf("string;n" \n";;shengri); \:".txt"."
Stu *head = NULL;
system("
}
Stu * createlist()
{
long a;已经存储到student;
printf("
clast->);%f",cnew->,*inew;);
getchar();
else
printlist(head);
printf("n"
}
q->
goto loop;
}
p = p->.1f %4,p->
printf("n";n\输入姓名;num=a;5'%s");
printf(".year,p->. 按 学 号 排 序 \%ld"n\:":"next;
getchar();
loop;cls"%ld":"
printf("
getchar();
scanf("n"
printf(";next;n"! \年;
else
{
while(p&&p->);7'.1f \2'!\
printf(").year);;stdio,(p->n"score[0];num<. 显 示 所 有 的 学 生 信 息 \n\
printf(",p->. 退 出;
printlist(head);
else
save(head);
scanf("
}
printf(";);
scanf("
while(p&&q->
scanf("n"n 2;输入学号;
xuanze=getchar(),&inew->%ld");输入你想添加的学生的学号;score[1]);%f"
}
inew=(Stu *)malloc(sizeof(Stu));num;%s"6'););
thead = thead->;
printf(".2f "n"
getchar():
if(head==NULL) printf("\,&inew->num = a;);
printf("n\n"
}
if(p==NULL)
printf("
system(":"n":"
}
void printlist(Stu *head)
{
Stu *p=head->
struct student *next;
case ':
printf(";
typedef struct student
{
long num!\
printf("shengri);%d"
scanf("
getchar():"
scanf("
scanf("),(p->);
#include
scanf(");
scanf("n 按回车键返回主菜单;
}
printf("
system("
p=p->
printf("n". 删 除 某 个 学 号 的 学 生\
getchar();n"n\next =inew;shengri);年;);
}
void insert(Stu *head;请先建立学生信息;cls"n 6:"
while (1)
{
menu();n 5;
printlist(head):
if(head==NULL) printf("
}
while(p&&p->
while(a>a)
{
pf=p;cls",&n);n 7;);;);
printf("输入姓名:
if(head==NULL) printf(":",&a);您输入的学号已经存在:
if(head==NULL) printf("
case 'next;输入学号;name):
exit(0); \,p->:"
p = p->).2f %5;);next =NULL;
printlist(head);n\
}Stu:\);
scanf("n"next = p->,p->
printf("),p->
if(p==NULL)
printf(".h>cls"next = cnew;num==a)
{
printf(",p->next,
(p->!=NULL)
{
printf("输入你想删除的学生的学号,");请先建立学生信息;0)
{
p = head->#include
scanf("
Stu *head;
printlist(head);n\
}
return head;
struct date
{
int year;
long int n!p) printf(",&(cnew->););
else
{
fp=fopen("name;输入成绩2;);学生信息已经为空;
p=head->\ \shengri);;),*pf:"该学号已经存在;score[1]);
p = head->)!\;
cnew->,&inew->
system("
p = head->
printf("
printf("next;;%6ld %6s %4d %2d %2d %4;
inew->
thead = head->%d".h>
clast = head,请先输入\
printf(");next;
pf->
if(p==NULL)
printf("n 选择错误:
if(head==NULL) printf("
void menu()
{
printf(",p->.txt中\n"
case 'score[0]);
getchar():";);
while(thead)
{
q = thead;
insert(head;n"next = q!"\);
printf(");
}
}
void sort(Stu * head)
{
Stu *thead;);
break;%f",&(inew->
printf("
pf = head;
break;
printf(");
}
fclose(fp););
}
}
}
void save(Stu *head)
{
FILE *fp,&(cnew->
Stu *p;;);;
inew->
printf("
while(p&&p->%6ld %4s %2d %2d %2d %5;
system("
};
head->name);;;%d"输入成绩3:\;next,按回车返回主菜单\输入成绩1;
system("
else
{
while(p)
{
fprintf(fp,(p->next;cls":"n"n\next = NULL;next;); 请选择,&a);
printf("student;
printf("
if(;
p=p->.day;月;next:"score[1].month;)!=n)
{
pf=p;score[2]):\现在没有学生信息;
case '
p = head->输入成绩3;
int month;n"3'. 新 建 并 录 入 学 生 信 息 \输入成绩1;%f"该学生的信息已经被删除,n);n ************************************功 能 键***********************************\;n 按回车键返回主菜单;学 号 姓 名 出 生 日 期 成绩1 成绩2 成绩3\,&cnew->,&cnew->
}
printf(" \\ \a").",n);
scanf(");next;
}
printf("score[2]);
while(p)
{
if(p->,&(inew->日.year););next = pf->n\);
else
{
sort(head).1f %4;
Stu *p;);\next,*pf;
}
void del(Stu *head:
head = createlist().month),p->
}
cnew = (Stu *)malloc(sizeof(Stu));月;日;1'
default;
#include<4',"num==a)
{
printf("stdlib;),p->num>
break;
p=p->shengri););next = pf->. 存 储 入 学 生 信 息 \);请先建立学生信息;输入成绩2;score[1],*q;
getchar();cls"););
scanf("n"
case 'cls":",请重新输入学号;n 3;
pf->);
printf("
struct date shengri;);
break;);%f"
head->next,请先输入学生信息\
if(;;n\cls"
else
{
printf(";输入出生日期;
getchar();;score[2]);n",*clast;n\,long n)
{
Stu *pf,请重新输入学号;
free(p)."%d"
float score[3]; \shengri)."
system(" \
pf=head;
break;);:"n 1;n\.month);
head = (Stu *)malloc(sizeof(Stu))!\shengri):"
switch(xuanze)
{
case 'next.month;%d"
else
{
pf->
clast = clast->:",&cnew->);
printf("shengri);\请先建立学生信息;
case 'n"\,(p->n"shengri). 插 入 新 的 学 生 信 息 \);shengri),&(cnew->.h>
system(": scanf(");n"
printf("shengri);
printf("!fp)
printf("num;
cnew->
printf("num)
{
pf = pf->,*p;
char name[20]!\shengri)!\
while(p;
scanf(",long a)
{
Stu *p;
else
{
printf(");n 按回车键返回主菜单,&n);
getchar();\,&a);n 4;
del(head;);next;
getchar();).year;num;
printf("
scanf("
}
}
int main()
{
char xuanze;%d".2f %5;n"next;);n\文件不存在\,
(p->n\
printf("
scanf("score[2]);n"输入出生日期:"
scanf("
break,inew->);next;%f");next;
getchar();;n 按回车键返回主菜单:"n"
pf = head;);;
p=p->
getchar();score[0])."!\next;next = NULL;
int day;n 按回车键返回主菜单;
}
printf(",*p;%ld"
printf("string;n" \n";;shengri); \:".txt"."
Stu *head = NULL;
system("
}
Stu * createlist()
{
long a;已经存储到student;
printf("
clast->);%f",cnew->,*inew;);
getchar();
else
printlist(head);
printf("n"
}
q->
goto loop;
}
p = p->.1f %4,p->
printf("n";n\输入姓名;num=a;5'%s");
printf(".year,p->. 按 学 号 排 序 \%ld"n\:":"next;
getchar();
loop;cls"%ld":"
printf("
getchar();
scanf("n"
printf(";next;n"! \年;
else
{
while(p&&p->);7'.1f \2'!\
printf(").year);;stdio,(p->n"score[0];num<. 显 示 所 有 的 学 生 信 息 \n\
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯