c语言编程软件高手,帮我把按工号查询改为按姓名查询

C语言程序设计课程设计选题_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
喜欢此文档的还喜欢
C语言程序设计课程设计选题
C​语​言​程​序​设​计​课​程​设​计​选​题
阅读已结束,如果下载本文需要使用
想免费下载本文?
把文档贴到Blog、BBS或个人站等:
普通尺寸(450*500pix)
较大尺寸(630*500pix)
你可能喜欢扫扫二维码,随身浏览文档
手机或平板扫扫即可继续访问
C语言程序设计课程设计选题
举报该文档为侵权文档。
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
推荐理由:
将文档分享至:
分享完整地址
文档地址:
粘贴到BBS或博客
flash地址:
支持嵌入FLASH地址的网站使用
html代码:
&embed src='/DocinViewer-4.swf' width='100%' height='600' type=application/x-shockwave-flash ALLOWFULLSCREEN='true' ALLOWSCRIPTACCESS='always'&&/embed&
450px*300px480px*400px650px*490px
支持嵌入HTML代码的网站使用
您的内容已经提交成功
您所提交的内容需要审核后才能发布,请您等待!
3秒自动关闭窗口c语言管理系统程序设计 急!_百度知道
c语言管理系统程序设计 急!
回答满意者会再追加分数的~,谢谢!大家帮帮忙一个教师工资管理系统的C程序十分紧急
《教师工资管理系统》注意一下题目哈,最好就是完全写好的,没办法自己去改了!因为时间紧急
提问者采纳
}}void search_zhicheng(){getchar();
case 7:);n&%d&system(&*定义一个结构体*/
scanf(&%d&quot,&n);t%d\&#92,em[i];
scanf(&quot.zhicheng=
printf(&n&);
if (fwrite(&em.
scanf(&quot.奖金 6;
printf(&quot,em[i];input(),原始记录为;请输入要修改的职工的姓名;
case 3;\;;
printf(&这里的代码错;\这里的代码错;);n&t%d\n&t%d\t基本工资\void display(););t保险\*录入函数*/
case 8;%d&%d&t
%s\);while(1){ do
menu(););.基本工资 5;n&quot.),em[i]:printf(&这里要用地址
em[i-1];n&n&quot,&quot.baoxian:break,所以下面的应该把改后的信息赋值给第i-1个人*/您输入有误;*m为输入部分的职工人数*/n&实际工资改为;&#47.cls&{
int m=load().zafei,要用数组下标
case 1,&em[i];char name[10];\n选择错误;t杂费\
printf(&i&
printf(&quot,flag,查无此人;/
printf(&quot,&c););
flag=0;m,fp).zafei),要用数组下标
printf(&quot,em[i].zhicheng););cannot open file\n& 按职称查询请按2 ,&zhicheng).职工号 2;void menu().jiben);j++)
em[j]=em[j+1],i;),em[i].zafei:\n&quot,&jiangjin).name,请重新选择;
getchar(),em[i];\
int m=load();;;%c&);n&保险改为;;);n&}int load()
/&#47:\modify():%d&请输入杂费;m,&n).t实际工资
\}system(&请输入基本工资;
display();n职工号\n&quot,em[i]:\这里的代码错;\);
printf(&请输入需要创建信息的职工人数(1--100);return(i-1);n&n%d&#92!\
case 2;switch(t){
case 1,sizeof(struct employee);
case 4.h&gt,&jiben);n 1;t姓名\flag&&i&t%c\);).浏览职工信息\请输入职工号.shiji):&#92.职称 4;
输入职工信息&#92,name1);\n&quot,请重新选择;
printf(&t%d\ n 浏览删除后的所有职工信息;
scanf(&);n&n&;%d&quot:n&quot,em[i].name:
}}while(flag==0);按职称查询\t实际工资
\t职称\t%d&#92.shiji=);t
%d&#92,em[i];
scanf(&请输入奖金;t%s&#92.h&t%s\这里要用地址
em[i-1];&#92:&#92:printf(&
printf(&),要用数组下标
printf(&}em[100];\请输入要查找的职称;
/char name1[10];);*调用保存函数*/&#92,c;这里要用地址
printf(&quot.n&i++){
if(strcmp(em[i];
FILE*t保险&#92,&
scanf(&quot:break:
system(&quot,&num);n&quot,em[i];
for (i=0.查询职工信息&
em[i-1];职称改为;
em[i-1];);
printf(&quot.修改职工信息\/cls&quot,em[i];
int m=load();\\
case 4,name1)==0)
printf(&#include &lt,em[i].shiji=em[i];
printf(&n职工号\
scanf(&system(&);printf(&quot,&m);
if ((fp=fopen(&t%d\返回查询函数请按1;姓名改为;system(&);
scanf(&*保存文件函数*/
/这里的代码错;n&quot,em[i];).
printf(&n&
printf(&*调用菜单函数*/n\file write error&#92,不再删除请按0\cls&void input();i++) /\);m,name):\=6)
flag=1.杂费 8;
%d\cannot open file\wb&t姓名\;t保险\t%d\
printf(&quot.search();del();n对不起;),&t),em[i];
printf(&t%s\t杂费&#92.t
%d\))==NULL)
printf (&t奖金\n职工号\
system(&quot,n:modify();
save(m);n&
printf(&n&);
FILE*void modify();
printf(&quot,em[i]:del().zhicheng,em[i],;).退出&#92,em[i];
}}void modify() /);
system(&quot,&em[i],em[i]:&#92:
&void save(int): &quot.n&),&b);&#92,flag,em[i],);
/t%c\这里的代码错:printf(&quot.shiji);search_zhicheng().shiji);\*如果删除;m;n 原来的职工信息;
for (i=0;t%d\search();i++)
default,em[i];
if((fp=fopen(&;n&quot,em[i];
while(flag==1){
case 1,i=0;&#92,不删除请按0\ /
printf(&);),则其他的信息都往上移一行*/n创建完毕;
scanf(&quot:goto la,要用数组下标
getchar();t杂费\1)
printf(&quot: &);
删除职工信息\ int m=load();scanf(&):奖金改为: &n&);t职称\m;
printf(&system(&%d&{%d&%d&\\这里的代码错;t实际工资
printf (&t杂费&#92,em[i];*定义各函数*/
printf(&n&
for(i=0;t杂费\):printf(&);stdio:&#92:
printf(&t职称&#92,查无此人\*修改函数*/n对不起;
%d\\请输入保险!\;i++) /n&
case 6;),i=0;t%d\);cls&quot!&quot:\
}}void search_name(){
char name1[10];t实际工资
\printf(&n继续删除请按1;t实际工资
%c\职工号改为;n&\
case 5;杂费改为;n&*将内存中职工的信息输出到磁盘文件中去*&#47.zhicheng==zhicheng){
printf(&printf(&quot,em[i],要用数组下标 printf(&n\n&
scanf(&;m-1;%d&n&
scanf(&quot,em[i];}void del()
/),em[i];您输入有误;
printf(&;/display();n&%s&这里的代码错;
case 0;,查无此人\;);n&* 调用浏览函数*/);
********************谢谢使用******************\
printf(&quot,要用数组下标
em[i];\i&
scanf(&=1&&n&n&);t%d\\\#include &
scanf(&),for语句后i自加了1; &#47!flag)
display(););
flag=0;t姓名\);n&
printf(&int jiangjin,em[i];))==NULL)
/m;n对不起;&#92.jiangjin).这里要用地址
for(i=0;t%d\;);t
%d&#92,&zafei);t基本工资&#92,其记录为,&t).num=/n确实要修改此人信息请按1 ;n&t基本工资\n&quot,继续查询学历请按2&#92:printf(&quot,em[i];t%d\\n确实要删除此人信息请按1;
scanf(&cls&quot,em[i];t%d\);
printf(&quot.
exit(0).num).baoxian - em[i];
switch(t){
case 2;else
printf(&);
}}while(flag==0);
printf(&{}system(&quot.
printf(&n&,em[i];i&
******************职工信息管理****************\\):
printf(&cls&
flag=0,em[i];;\t%d\rb&quot.
printf(&quot,name);\
int i=0,n;\&#47,&t););请输入姓名;t%c&#92.i&scanf(&).name)==0){
printf(&j&
printf(&char name[10]:\n&n&quot,&n);i++){
if(strcmp(em[i];t姓名&#92!&#92,&em[i];\
case 2,em[i];int m=load(),em[i];t%s\);n&
scanf(&quot,em[i];这里的代码错;%d&*调用浏览函数*/int zafei: &);*浏览函数*/
网计091 第7小组\{
printf(&n&&#47.保险 7.h&*查询函数*/*创建文件并判断是否能打开*&#47.%s&quot.n职工号\n&n&quot,原始记录为;printf(&quot,em[i],em[i];n& 不修改请按0\n需要进行修改的选项\system(&quot,查无此人:printf(&quot:
\*菜单函数*/&#92:
&*删除函数*/%d&for(flag=1;;);%s&quot,&baoxian);%d&quot:\/;{n&
printf(&quot!=1)
printf(&quot,t;):
&);t%d&#92:printf(&quot,em[i];* 调用浏览函数*/employee_list&}void save(int m)
/*导入文件内的信息*/t%d\
scanf(&quot:\
/t姓名\);
case 5:n职工号\string:printf(&quot:
&cls&quot,em[i];system(&
printf(&t奖金\n%d\n&.shiji);
修改职工信息\
for(j=i;请输入要删除的职工的姓名:printf(&
scanf(&&#92.jiangjin - em[i];\);&#92,name1););n&n&
char a: &这里的代码错:\\system(&);\%d&quot.请输入职称;employee_list&);
/search_name();&#47,em[i];n&
printf(&);;
按职工号查询职工信息\);
printf(&n&quot.jiangjin=%s&n对不起;
}void search()/n&quot.
6;);%c&n继续修改请按1.zafei=);
fread(&):printf(&),j;}fclose(fp);}void input()
//n已找到此人;n&);for(flag=1;;void search();&#47:printf(&t基本\
scanf(&%c&n按姓名查询请按1 ;
printf(&quot:printf(&n&=1&&t&),name),em[i];
case 1;n&quot: &/*因为当找到第i个职工时:main();n&t奖金\!\\t
%d\break,sizeof(struct employee),要用数组下标
printf(&quot,&t).删除职工信息\);
printf(&基本工资改为;;
谢谢使用;t%c\;printf(&请选择你需要操作的步骤(1--6),&em[i];\n&
t保险\%d&)?\
scanf(&t保险\i++)
if(strcmp(name1;{t基本工资&#92,t;t奖金&#92:&#92,不再修改请按0\n已找到此人;\n浏览修改后的所有职工信息;););n&n 原来的职工信息,&t);t%d\/ /printf(&printf(&i++)
printf(&cls&void search_name().jiben=););n&quot.h&
}void main(){
scanf(&&#92.n&);n&quot.姓名 3;
save(m);/n%d\n&n&/);t职称&#92.do{
printf(&i&lt,1;n&cls&quot.jiben + em[i];\%d&/
while(feof(fp)==0);n是否确定所修改的信息;\#include &lt.zafei:search();),1;
default ,em[i];%s&quot,t=0;
while(b==2);\\);\
scanf(&quot,&em[i]: &&#92,请重新选择; 不;);m;
strcpy(em[i-1],em[i];&#47.实际工资\按任意键继续\cls&quot.baoxian);;
printf(&);%d&
fclose(fp);
scanf(&*导入函数*&#47,t;
printf(&cls&n&quot,m,重新修改 请按2;t奖金&#92:system(&#define N 100struct employee{/t%d&#92./请输入你想修改的那一项序号;.t%d\8||c&%d&}void display()
/getchar(););):printf(&quot,&shiji);%d&quot.n&
if(t&返回查询函数请按1;n&
printf(&n&quot.name):n&
浏览职工信息\\%d&quot#include &n 是 请按1 :printf(&
1;;n\%d&n已找到此人!&
&#47,name)==0)
printf(&flag&&i&);
/printf(&);n%d&#92.shiji).&#47,要用数组下标
printf(&),要用数组下标
printf(&);请输入要查找的姓名;
case 1;);\););
&#47: &,其记录为,&zhicheng).); 进入主函数按3&#92,fp).zhicheng.
/);t%d\%d&;
display(););
if(flag==1)
printf(&scanf(&;/cls& /;
display().num.录入职工信息&n&););.);{
int i,&em[i];
flag=0;t职称&#92:\void menu()
/):printf(&
printf(&void search_zhicheng();for(i=0,继续查询职工号请按2\n\n&n&按姓名查询\;;&#92!\n&n已找到,em[i];
i++;void del()
提问者评价
其他类似问题
您可能关注的推广回答者:回答者:
c语言的相关知识
其他1条回答
obj:save_to_file(){
ofstream outfile(&
infile&&&lt:&(*p[loop+1]);
cin&}void My'&
for(int i=0;
n++;&&lt!#include&&&choice2;
if(};&Student stud[10];=length-2;&\是否继续;
cout&是否继续;&
for(int r=0;&&string&6.&&gt:&loop=loop-1){
if((*p[loop]):
cout&&endl.find(st);}
if(g&age&&&&&lt:pmajsco(){
cout&\t&t&(ostream&&&&&10;
outfile&是否继续;sex:;)&主修三门成绩为;&
k&) break?(y/&&&
2;请输入辅修的两门成绩;&
float majaverage(){return (majave=(Maj_score[0]+Maj_score[1]+Maj_score[2])&#47.average();&#92: &&i&endl,n);
void show();&
cout&&Maj_score[2]&
cout&sex&&major 3&n)&}
void bubble2(Student* p[];&&3;
case 7,n).退出;name&&;Student* ptr[10]:
flag=1;&&&&
& &是否继续;void Minor!='t&
ptr[r]=&stud[r]:
cin&&lt.pminsco();}
int main(){
int n=0;n;Min_score[1]&;&lt:&&&
for(int g=0: &}void M&&p++){
stud[p];3:;&&&
cin&Min_score[1]:average(){
ave=(Maj_score[0]+Maj_score[1]+Maj_score[2]+Min_score[0]+Min_score[1])/t&i++){
stud[i];求辅修平均分 &
Student* temp.pmajsco();age&&
cout&&&gt:get_from_file(){
p[loop+1]=&
cout&&(*ptr[b])&lt!&
cin&n);&&ave&&&gt.按辅修平均成绩&&&&
if(/&quot:
Student(){};&&&loop=loop-1){
if((*p[loop]);选择要进行的操作.show();&segment&endl&lt,b;t&&quot.open(&0;&quot:
bubble2(};&3;&&
cout&lt.majaverage()){
temp=p[loop];segment=segment+1){
for(loop=length-2;&
for(int p=0;
cout&&n;&&
stud[i];&&&&
p[loop]=p[loop+1];&Maj_score[a];5;&&lt.输出文件信息&
&quot.majaverage()&
outfile&lt.minaverage()){
temp=p[loop]: &&&&&lt: &&&quot:&quot:&&
cout&&&lt,&&&
cout&Min_score[b];&void StudB&&&major&n;void Student.保存到文件file&quot.pmajsco().reave()&b&&y'
for(segment=0;
cout&&&&endl:;
for(segment=0;&请输入辅修的两门成绩;t&quot: &;
case 5;&&i&&&p&
&&\&&loop=loop-1){
if((*p[loop]);输入成功?(y/返回总平均值
friend ostream& operator &所有学生平均分为;2:app);
stud[n]:&&quot!outfile)
infile&endl!infile)
cerr&lt.pminsco();&lt.查询学生信息&&\\;&
float minaverage(){return (minave=(Min_score[0]+Min_score[1])/b&
y'3;endl.show();name&t&minor 2&&name&k++){
stud[k];1;2;&gt:
void gmajsco();
/&&&请输入主修的三门成绩;(*this);&&\&&lt,Maj_score[s];
cout&lt,public Minor{
public:;y'
};&&&lt:&&&;
cout&平均成绩为:&
cout&number&
cout&lt.学生成绩排序(从高至低)&&;(sum/&&
Student*&gt:
float Maj_score[3];从文件提取信息
void save_to_file();是否继续;&&;
cin&n);4;&t&&quot:public M
for(int s=0;&}void bubble1(Student* p[];6;}
void bubble3(Student* p[];
Maj_score[i];
cout&lt?(y/&&&&7;
break.输出学生信息&
void pmajsco()?(y/;&quot:&
p[loop]=p[loop+1];segment&请输入需要查询的学生姓名或学号;&i++){
cin&/file!&b&&s++){
float Min_score[2];&/
cout&lt:in);&
cout&}void StudBa&
return.dat error:;
p[loop+1]=iostream&gt.dat&
cout&&;t&n);b++){infile&gt:
for(int i=0:virtual public StudBase{number&&class StudBase{endl.dat&&&&&&&quot,int length){&&
for(b=0;y'major&quot:&endl&
char flag:&t&&
infile&/=&lt!&&
cout&} class Student:&请输入学生基本信息;
case 3;&&;
void average();&&&7;&flag:
void gminsco();&#92.reave()){
temp=p[loop]:find(string str){if((str==name)||(str==number)){
cout&segment=segment+1){
for(loop=length-2;
for(int a=0.enter();&lt: &4;&&&&t&
return 0;&
查无此人: &&=length-2;
sex=new char[10];&&;
cout&&&学生基本信息为;&3);
for(int w=0;Min_score[0]&2;
cout&&quot!='&&:;&&
if(flag==0){
cout&lt,&b&
cout&lt.get_from_file();n&#39?(y/&
void pminsco();&
outfile&lt,n);&&(*ptr[b])&major&
cout&lt.查询学生信息&&minor 1&quot:&
while(cin&(*ptr[b])&请输入主修的三门成绩; 1;5;&sex&&}
/&lt.统计学生成绩&3;
cin&&quot:&quot!='&&&
return:&3;
outfile&&&lt:&=length-2;&
float sum=0:
n++.按主修平均成绩&&
sex=new char[10];&lt:
int choice2;
cout&void Major:;} /
cout&n);major 2&&&
for(segment=0;保存到文件
float reave(){&Min_score[g];&lt:;
outfile&y&#39:
cin&gt.学生成绩排序(从高至低)&#include&s&lt.输出文件信息&&lt:;name.save_to_file();t&w++){
sum=sum+stud[w];
stud[i];&&&&&&}
for(int b=0;&&gt,int length){&&
cin&&&\2);&
Student*)};
j++;&major 1&endl.gminsco();是否继续;&
sex=new char[10];&
infile&gt,j=0;&&quot:;\loop&&
string major:;是否继续.输入学生信息&
cin&&quot!=&#39:pminsco(){
cout&&lt.输出学生信息&&
switch(choice2){
case 1;&lt.保存到文件file&quot,看我的;&gt:show(){
cout&2;&lt,Student& obj)
;求主修平均分 Maj_score[s]&&r&lt:
cout&lt.close();&&loop&w&
for(int k=0;&lt.输入学生信息&loop&&lt:;&n);&Maj_score[1]&;}int flag=0;sex:
1;(*p[loop+1]);f;g++){
switch(choice){
case 1;&n;segment&Min_score[0]&&quot.average();&请输入需要从文件输出对象信息的个数;}
/)age:&&&&lt!=&#39.0;f;#include&;&age&lt: &&&#47:&
}void S&&lt:enter(){
cout&&求总平均分
void find(string);
case 3;&&b++){
cout&&&&&&&&
for(b=0:&quot:&
for(b=0;segment=segment+1){
for(loop=length-2;&5;
case 2.close();&lt,int length){&b++){
cout&lt.退出;&
StudBase(){}
void enter().统计学生成绩&& &quot.按总平均成绩&&(*p[loop+1]);
exit(1):&)
cout&;&#92!='\&Maj_score[0]&endl&;&quot?(y&#47.reave();&n;)t&&
outfile&查询结果为;number&辅修的两门成绩为;&}
class Ma++){infile&sex&
if(flag=='::gminsco(){
cout&stud[k];&
cin&&fstream&
stud[n];&&lt?(y&#47!&
cout&lt.&quot.minaverage()&
p[loop]=p[loop+1];
void get_from_file();&
p[loop+1]=&&}void S&&Min_score[g]&/
cin&gt:out|&&
cin&;\&lt:gmajsco(){
cout&lt:virtual public StudBase{&
cin&gt又是这个题哈哈.gmajsco();b++){
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁C语言课程实践题目_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
&&¥2.00
&&¥3.00
&&¥2.00
&&¥1.00
喜欢此文档的还喜欢
C语言课程实践题目
阅读已结束,如果下载本文需要使用
想免费下载本文?
把文档贴到Blog、BBS或个人站等:
普通尺寸(450*500pix)
较大尺寸(630*500pix)
你可能喜欢C语言课程设计-职工信息管理系统说明书1_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
评价文档:
喜欢此文档的还喜欢
C语言课程设计-职工信息管理系统说明书1
C​语​言​课​程​设​计​-​包​括​源​程​序
阅读已结束,如果下载本文需要使用
想免费下载本文?
把文档贴到Blog、BBS或个人站等:
普通尺寸(450*500pix)
较大尺寸(630*500pix)
你可能喜欢
20080份文档

我要回帖

更多关于 c语言高手 的文章

 

随机推荐