当前位置:首页 » 编程语言 » 人事管理系统c语言

人事管理系统c语言

发布时间: 2022-07-08 22:06:58

‘壹’ 求助!!!用c语言编写一个“员工人事管理系统 ”

这个一般的书上都有实例吧,把相关的名称改改就成了

‘贰’ 怎么用C语言写人事管理系统,要求就是这样

首先创建一个结构体,如——structstudent{charnum[10];//学号charname[20];//姓名charsex[4];//性别

‘叁’ C语言编写人事管理系统

这个设计不是很复杂,可以尝试自己做做,

不懂的地方,我帮你解决。me 我,

给你部分代码,

‘肆’ 怎样用c语言来编程一个学校人事管理系统

你这是个作业或者是本科的毕业设计吧?
只用C的话,你要确定程序最终的运行环境.因为主要是用windows的,所以假定你用的windows,这样的话,你的程序界面就需要用windwos
sdk编程的知识了,因为你用C,所以MFC就没法用了,那个是C++的.
数据的存储,你可以采用自己设计存储文件的方式,也可以使用现有的数据库,推荐采用sqlLite或者mysql.
如果你的和序序跑在linux下,那可以采用gtk来做界面.

‘伍’ C语言人事管理系统

老师布置的作业要自己好好做。知道也不告诉你,让你干着急哈。

‘陆’ c语言 编一个人事管理系统 具有①信息的录入 ②信息的修改 ③信息的插入 ④信息的删除:的功能

#include<stdio.h>
#defineN40
#include<string.h>
#include<conio.h>
#include<stdlib.h>
structstudent{
longnum;//工号
charname[10];//姓名
charsex[4];//性别
charad[100];//地址
charbarthday[20];//出生日期
charapartnum[100],posinum[10],adds[100];//部门编号、职务编号、备注
charposiname[20];//职务名称
floatincome;//职务工资
}st[N];
voidmenu()
{
printf("**************************************** ");
printf("欢迎使用家庭财务管理系统 ");
printf("**************************************** ");
printf("1:添加记录 ");
printf("2:查询记录 ");
printf("3:删除记录 ");
printf("4:显示所有记录 ");
printf("0:退出 ");
}
voidinput(structstudents[],int*n)
{
printf("请输入您所要添加的职工数目 ");
intx,i,j,b,flag=0;
scanf("%d",&x);
b=*n+x;
for(i=*n+1;i<=b;i++)
{
flag=1;
printf("请输入员工工号: ");
scanf("%ld",&s[i].num);
for(j=1;j<i;j++)
if(s[i].num==s[j].num&&i>1)
{printf("输入有误 ");flag=0;i--;b--;break;}
if(flag)
{
printf("请输入员工姓名: ");
scanf("%s",s[i].name);
printf("请依次输入该员工性别、出生日期、地址、部门编号、职务编号、职务名称、职务工资、备注: ");
scanf("%s%s%s%s%s%s%f%s",&s[i].sex,&s[i].barthday,&s[i].ad,&s[i].apartnum,&s[i].posinum,&s[i].posiname,&s[i].income,&s[i].adds);
}
}
*n=b;if(flag)printf("添加成功 ");
printf("输入完毕!按任意键返回主菜单!");getch();
}
voidDelete(structstudents[],int*n)
{
printf("请输入您所要删除的职工姓名 ");
charm[10];intj;
scanf("%s",m);
for(j=1;j<=*n;j++)
if(strcmp(s[j].name,m)==0)
{
*n=*n-1;
for(;j<=*n;j++)
s[j]=s[j+1];
break;
}
printf("删除成功! ");
printf("输入完毕!按任意键返回主菜单!");getch();
}
voidfind(structstudents[],intn)
{
longb=0;charc[10],kk[10];
printf(" **************************************** ");
printf(" 1.1----------按工号查询 ");
printf(" 1.2----------按姓名查询 ");
printf(" **************************************** ");
intj,e,flag=0;
floatsoc;
scanf("%s",kk);
if(strcmp(kk,"1.1")==0){
printf("请输入职工工号 ");
scanf("%s",c);
{
for(j=0,e=strlen(c);j<e;j++)
b=b*10+c[j]-48;
printf("工号姓名性别出生日期地址部门编号职务编号职务名称职务工资备注 ");
for(j=1;j<=n;j++)
if(b==s[j].num)
{
flag=1;
printf("%ld%s%s%s%s%s%s%s%.2f%s",s[j].num,s[j].name,s[j].sex,s[j].barthday,s[j].ad,s[j].apartnum,s[j].posinum,s[j].posiname,s[j].income,s[j].adds);
}
if(!flag)
printf("未找到相关职工信息 ");
}
}
elseif(strcmp(kk,"1.2")==0)
{
printf("请输入职工姓名 ");
scanf("%s",c);
printf("工号姓名性别出生日期地址部门编号职务编号职务名称职务工资备注 ");
for(j=1;j<=n;j++)
if(strcmp(s[j].name,c)==0)
{
flag=1;
printf("%ld%s%s%s%s%s%s%s%.2f%s ",s[j].num,s[j].name,s[j].sex,s[j].barthday,s[j].ad,s[j].apartnum,s[j].posinum,s[j].posiname,s[j].income,s[j].adds);
}
if(!flag)
printf("未找到相关职工信息 ");
}
else
printf("输入有误..... ");
printf("查找完毕!按任意键返回主菜单!");getch();
}
voidprint1(structstudents[],intn)
{
printf("工号姓名性别出生日期地址部门编号职务编号职务名称职务工资备注 ");
for(;n>0;n--)
printf("%ld%s%s%s%s%s%s%s%.2f%s ",s[n].num,s[n].name,s[n].sex,s[n].barthday,s[n].ad,s[n].apartnum,s[n].posinum,s[n].posiname,s[n].income,s[n].adds);
printf("输出完毕!按任意键返回主菜单!");getch();
}

intmain()
{
menu();
intx,n=0;
while(scanf("%d",&x)!=EOF&&x!=0)
{
switch(x)
{
case1:input(st,&n);break;
case2:find(st,n);break;
case3:Delete(st,&n);break;
case4:print1(st,n);break;
default:printf("Inputerror! ");
}
system("cls");/*清屏*/
menu();
}
return0;
}

‘柒’ 求一个c语言人事管理系统

不灭王朝

码龄9年

关注
int menu(){
printf("请按提示输入完成操作!\n");
printf("1.查询员工信息\n");
printf("2.统计员工数量\n");
printf("3.录入员工信息\n");
printf("4.删除员工信息\n");
printf("5.按id排序所有员工\n");
printf("6.打印所有员工信息\n");
printf("7.退出系统\n");
return 0;
}

如menu()函数所示,该系统一共有7个功能

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct emp{
int id;
char name[50];
struct emp * next;
// struct emp * prev;
};

struct emp * initList();

struct emp * addListTailNode(struct emp * head);

struct emp * deleteListNode(struct emp * head,int id);

struct emp * searchEmp(struct emp * head,int id);

int printList(struct emp * l);

int printNode(struct emp * p);

struct emp * sortList(struct emp * head);

int getListLen(struct emp * head);

int writeToDisk(struct emp * head);

struct emp * readFromDisk();

int menu();

int usage(struct emp * head);

#include "emp.h"

int main(){
struct emp * head;
head=readFromDisk();
usage(head);
return 0;
}

struct emp * initList(){
struct emp * head;
head=(struct emp *)malloc(sizeof(struct emp));
head->next=NULL;
return head;
}

struct emp * addListTailNode(struct emp * head){
int id;
char name[50];
struct emp * p, * last , * check;
last = head;
while(last->next!=NULL){
last=last->next;
}
printf("依次输入:员工id号,姓名!\n");
scanf("%d%s",&id,&name);
check = head;
while(check!=last){ //遍历
check=check->next;
if(id==check->id){
printf("添加失败!员工id号重复!\n");
return head;
}
}
p=(struct emp *)malloc(sizeof(struct emp));
p->id=id;
strcpy(p->name,name);
//
last->next=p;
last=p;
p->next=NULL;
printf("%s员工信息已添加!\n",p->name);
return head;
}

struct emp * deleteListNode(struct emp * head,int id){
struct emp * p,* q;
p = head->next;
while(p!=NULL){
if(p->next->id==id){
break;
}
p=p->next;
}
if(head->next==NULL){
printf("书籍信息为空!删除失败!\n");
}
else{
q = p->next;
p->next = q->next;
printf("%s书籍信息被删除!\n",q->name);
free(q);
}
return head;
}

struct emp * searchEmp(struct emp * head,int id){//查询,返回节点信息
struct emp * p;
p = head->next;
while(p!=NULL){
if(p->id==id){
break;
}
p=p->next;
}
return p;
}

int printNode(struct emp * p){//打印节点信息
if(p!=NULL){
printf("员工id: %d 员工姓名:%s\n",p->id,p->name);
}
else{
printf("系统内无该员工信息!\n");
}
return 0;
}

int printList(struct emp * head){ //打印整条链表
struct emp * p;
p = head->next;
while(p!=NULL){
printNode(p);
p=p->next;
}
return 0;
}

struct emp * sortList(struct emp * head){//排序
struct emp * p,* q;
int temp_id;
char temp_name[50];
for(p=head->next;p!=NULL;p=p->next){
for(q=p->next;q!=NULL;q=q->next){
if(p->id>q->id){
temp_id = q->id;
q->id = p->id;
p->id = temp_id;
//
strcpy(temp_name,q->name);
strcpy(q->name,p->name);
strcpy(p->name,temp_name);
}
}
}
return head;
}

int getListLen(struct emp * head){
int len=0;
struct emp * p;
p=head->next;
while(p!=NULL){
len++;
p=p->next;
}
return len;
}

int writeToDisk(struct emp * head){
FILE * fp;
struct emp * p;
if((fp = fopen("D:\\emp.hhtx", "w")) == 0){
printf("写入失败……!\n");
return 0;
}
//
p=head->next;
while(p!=NULL){
fwrite(p,sizeof(struct emp),1,fp);
printf("%d %s\n",p->id,p->name);
p=p->next;
}
fclose(fp);
return 0;
}

struct emp * readFromDisk(){
FILE * fp;
struct emp * head,* last,* p,* temp;
head = initList();
if((fp = fopen("D:\\emp.hhtx", "r")) == 0){
printf("加载失败……未找到存档数据!\n\n");
return head;
}
//
last = head;
p=(struct emp *)malloc(sizeof(struct emp));
while(p!=NULL){
p=(struct emp *)malloc(sizeof(struct emp));
fread(p,sizeof(struct emp),1,fp);
printf("读取数据: %d %s\n",p->id,p->name);
//
last->next=p;
last=p;
p=p->next;
}
fclose(fp);
printf("系统数据初始化完成!");
return head;
}

int menu(){
printf("请按提示输入完成操作!\n");
printf("1.查询员工信息\n");
printf("2.统计员工数量\n");
printf("3.录入员工信息\n");
printf("4.删除员工信息\n");
printf("5.按id排序所有员工\n");
printf("6.打印所有员工信息\n");
printf("7.退出系统\n");
return 0;
}

int usage(struct emp * head){
int x,id;
struct emp * p;
menu();
while(1){
printf("请输入序列号:");
scanf("%d",&x);
switch(x){
case 1:
printf("输入所要查询的员工的id号:");
scanf("%d",&id);
p = searchEmp(head,id);
printNode(p);
printf("---------------------------------\n");
break;
case 2:
printf("系统中一共存在%d个员工\n",getListLen(head));
break;
case 3:
head=addListTailNode(head);
printf("---------------------------------\n");
break;
case 4:
printf("输入所要删除的员工的id号:");
scanf("%d",&id);
head=deleteListNode(head,id);
printf("---------------------------------\n");
break;
case 5:
printf("排序开始……\n");
head=sortList(head);
printf("排序已完成!\n");
printf("---------------------------------\n");
break;
case 6:
printList(head);
printf("------

‘捌’ 用c语言编写简易人事管理系统主要有工人号码,姓名,出生日期,工资

摘要 #include int n;void draw(int n) { int i,j;for (i=1-(n>>1);i=0) { for (j=0;j<i;j++) printf(" ");for (j=1;j<=2*(n-i)+1;j++) printf(" *");printf(" ");} else { for (j=i;j<0;j++) printf(" ");for (j=1;j<=n+2*i+1;j++) printf(" *");for (j=1;j<=-1-2*i;j++) printf(" ");for...

热点内容
滑板鞋脚本视频 发布:2025-02-02 09:48:54 浏览:432
群晖怎么玩安卓模拟器 发布:2025-02-02 09:45:23 浏览:557
三星安卓12彩蛋怎么玩 发布:2025-02-02 09:44:39 浏览:743
电脑显示连接服务器错误 发布:2025-02-02 09:24:10 浏览:537
瑞芯微开发板编译 发布:2025-02-02 09:22:54 浏览:146
linux虚拟机用gcc编译时显示错误 发布:2025-02-02 09:14:01 浏览:235
java驼峰 发布:2025-02-02 09:13:26 浏览:651
魔兽脚本怎么用 发布:2025-02-02 09:10:28 浏览:538
linuxadobe 发布:2025-02-02 09:09:43 浏览:212
sql2000数据库连接 发布:2025-02-02 09:09:43 浏览:726