c语言教师工资管理系统源程序设计,C语言教师工资管理系统源程序.docx

include

include

#include

#define LEN sizeoffstruct teacher) struct teacher *creat();

struct teacher

int num;

char name[10];

char sex[8];

char unit[10];

char address[10];

long telnum;

float salary_l;

float allowance;

float life allow;

float salary_2;

float tel_fee;

float tax;

float health_fee;

float water_fee;

float rent;

float grant;

float total_fee;

float actual_salary;

struct teacher *next;

};

int n;

struct teacher *head;

FILE *fp;

struct teacher *creat(void)

{

struct teacher *pl,*p2;

n=0; pl=p2=(struct teacher *)malloc(LEN); printfC教师号门;

scanf("%d",&pl->num);fflush(stdin); printff'教师姓名:”); gets(pl-〉n ame);

printf (n教师性别:“); gets(pl->sex);

printf ("单位名称:”);

gets(pl-> unit);

print f(”家庭地址:“);

gets(pl->address);

p rintfC吨话号码:”); scanf("%ld"/&pl->telnum);fflush(stdin);

printf (n基本工资:“);

scanf("%f",&pl->salary_l);fflush(stdin);

printff1 津贴:”);

scan &pl->allowance);fflush(stdin);

print f(”生活补贴:“);

scanf(H%f",&pl->life_allow);fflush(stdin);

printff'电话费:”);

scanf("%f",&pl->tel_fee);fflush(stdin);

pri ntf(“个人所得税:”);

scanf("%f"z&pl->tax);fflush(stdin);

p rintf(n房租:“);

scanf("%f",&pl->rent);fflush(stdin);

p rintf(”公积金:“);

scanf("%f"z&pl->grant);fflush(stdin);

printff'水电费

scanff"% 化&pl->water_fee);fflush(stdin);

pri ntf(”卫生费:”); scanf("%f",&pl->health_fee);fflush(stdin);

pl->salary_2=pl->salary_l+pl->allowa nce+pl->life_allow; pl->total_fee=pl->tel_fee+pl->water_fee+pl->re nt+pl->tax+pl->health_fee+pl->gra nt;

pl->actual_salary=pl->salary_2-pl->total_fee;

head=NULL;

while(pl->num!=O)

{

n 二 n+1;

讦(n 二=l)head=pl;

else p2->next=pl;

p2=pl;

pl=(struct teacher*)malloc(LEN);

prin tf(“教师号:“);

scanf("%d",&pl->num);fflush(stdin);

prin tf(”教师姓名门;

getsfpl->n ame);

pri ntf(“教师性别:“);

gets(pl->sex);

pri ntf(惮位名称:“);

getsfpl->unit);

pr intf(”家庭地址:”);

gets(pl->address);

printf(H电话号码:“);

scanf(“%ld”,&pl?>telnum);fflush(stdin);

pri ntf(”基本工资

scanf("%f",&pl->salary_l);fflush(stdin);

printfC 津贴:“);

scan &pl->allowance);fflush(stdin);

pr intf(”生活补贴:”);

scanf("%f"z&pl

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值