统计工资c语言程序.ppt

统计工资c语言程序.ppt

* * 一、设计要求 1、功能设计要求 第五讲 统计工资 ⑴结构体定义 typedef struct employee{ int age; char *name; double salary; } *PEMP; ⑵在main函数中构造结构体指针数组company ⑶设计函数update为company赋值 update(company,id,age,name,salary) id :数组下标 ⑷设计函数readin 使用update赋值 update(company,2,22,“章兰花”,3000.0); ⑸编写total函数对工资求和 在全体职工或一定年龄段内的职工工资求和。 ⑹编写mean函数求平均工资 #includestdio.h #includestdlib.h #include string.h #define num 10 typedef struct employee{ int age; char *name; double salary; } *PEMP; void update(PEMP*,int, int,char*,double); double total (PEMP*); double mean(PEMP*); void readin(PEMP*); 二、程序源代码 void main() { PEMP company[

文档评论(0)

1亿VIP精品文档

相关文档