教师信息管理c语言程序设计,c语言程序设计教师工资管理系统_具体的设计报告...
n=n+1真n=1假head=p1p2->next=p1 把p1所指的结点把p1所指的结点 作为第一结点连接到表尾p2=p1 在开辟一个新结点,使p1指向它 读入一个老师数据给p1所指结点 删除结点真链表是一个空表假p1=head 输当num!=p1->...
n=n+1 真 n=1 假 head=p1 p2->next=p1 把p1所指的结点把p1所指的结点 作为第一结点连接到表尾 p2=p1 在开辟一个新结点,使p1指向它 读入一个老师数据给p1所指结点 删除结点
真链表是一个空表假 p1=head 输当num!=p1->num以及p1所指的结点不是表尾结点结点 出 空 p2=p1 表 p1=p1->next 是 p1是要删除的结点否 是 p1所指的头结点否输出找 head=p1->next p2->next= 不到的信息 p1->next 息
插入结点
p1=head,p0=stud 是原来的链表是空表否 当p0->num>p1->num以及p1 所指的不是表尾结点 将p0所 p2指向p1位置 指的结 p1向后移一个结点 点作为 p0->num<=p1->num 唯一的真假 结点是p1指向头结点否 p1->next=p0 head=p0 p2->next=p0 p0->next=NULL p0->next=p1 p0->next=p1
修改
调用query函数查找到相关结点地址 是否存在该教师信息 修改相关结点的值域 修改完毕
三、详细设计
源程序
#include#include#include
#define LEN sizeof(struct teacher) struct teacher *creat(); struct teacher { char num[11]; char name[10]; char sex[8]; char unit[10]; char address[10]; longtelnum; float salary_1; float allowance; floatlife_allow; float salary_2; floattel_fee; float tax; floathealth_fee; floatwater_fee; float rent; float grant; floattotal_fee; floatactual_salary; struct teacher *next; };
int n;
struct teacher *head; FILE *fp;
struct teacher *creat(void) { struct teacher *p1,*p2; n=0; p1=p2=(struct teacher *)malloc(LEN); printf(\教师号:\
scanf(\printf(\教师姓名:\gets(p1->name); printf(\教师性别:\gets(p1->sex);
printf(\单位名称:\gets(p1->unit);
printf(\家庭地址:\gets(p1->address);
printf(\电话号码:\
scanf(\
printf(\基本工资:\
scanf(\
printf(\津贴:\
scanf(\
printf(\生活补贴:\
scanf(\
printf(\电话费:\
scanf(\
printf(\个人所得税:\
scanf(\
printf(\房租:\
scanf(\
printf(\公积金:\
scanf(\
printf(\水电费:\
scanf(\
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)