printf(\年龄\\t\
scanf(\ printf(\婚否(是y/否n)\\t\
scanf(\ printf(\地址\\t\
scanf(\ printf(\职称\\t\
scanf(\ printf(\工资\\t\
scanf(\
fwrite(&teac[j],sizeof(struct teacher),1,fp);/*信息写入磁盘*/ j++;
printf(\你是否要输入职工信息?(是:y/否:n)\\n\ getchar(); scanf(\
}
fclose(fp);/*关闭文件*/ } if(i==2) {
if((fp=fopen(\判断文件能否打开*/ {
printf(\ exit(0); }
for(n=0;(fread(&teac[n],sizeof(struct
teacher),1,fp)==1);n++)continue;/*将职工信息读入内存*/ fclose(fp);
printf(\你是否要增加职工信息?(是:y/否:n)\ scanf(\
while(strcmp(ch,\判断是否要录入新信
息*/ {
printf(\姓名\\t\
scanf(\ printf(\性别(男:b/女:g)\\t\
scanf(\ printf(\生日:年\\t\
scanf(\ printf(\月\\t\
scanf(\
while(teac[j+n].mounth<1||teac[j+n].mounth>12) {
printf(\输入月份有误请重输\ scanf(\ }
printf(\年龄\\t\
scanf(\ printf(\婚否(是y/否n)\\t\
scanf(\ printf(\地址\\t\
scanf(\ printf(\职称\\t\
scanf(\ printf(\工资\\t\
scanf(\
//fwrite(&teac[j+n],sizeof(struct teacher),1,fp);/*信息写入磁盘*/ n++;
printf(\你是否要输入职工信息?(是:y/否:n)\\n\ getchar(); scanf(\ }
if((fp=fopen(\判断文件能否打开*/ {
printf(\ exit(0);
}
for(j=0;j fwrite(&teac[j],sizeof(struct teacher),1,fp);/*信息写入磁盘*/ fclose(fp); } } /*函数功能:计算总工资*/ void all() { FILE*fp; n=0; sum=0; if((fp=fopen(\ { printf(\ exit(0);