资源描述:
《求一个用C++语言写的学生信息管理系统源代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、#defineN1000#defineM3#include#includestructstudent{intnum;charname[10];charsex[4];intscore[M];inttotal;};voidinput(structstudentst[],intn){inti;for(i=0;i2、[2]);printf("");}for(i=0;i3、tstudentst[],intno,intn){inti,j,low,mid,high;structstudenttemp;for(i=0;ist[j].num){temp=st[i];st[i]=st[j];st[j]=temp;}}}low=0;high=n-1;while(low<=high){mid=(high+low)/2;if(no>st[mid].num){low=mid+1;}elseif(no4、lse{printf("num:%d,name:%s,sex:%s,score:%d,%d,%d,total:%d",st[mid].num,st[mid].name,st[mid].sex,st[mid].score[0],st[mid].score[1],st[mid].score[2],st[mid].total);break;}}}voidseek_2(structstudentst[],intno,intn){inti;for(i=0;i5、sex:%s,score:%d,%d,%d,total:%d",st[i].num,st[i].name,st[i].sex,st[i].score[0],st[i].score[1],st[i].score[2],st[i].total);}}}voiddel(structstudentst[],intno,intn){inti,j;for(i=0;i6、tn){printf("shuruxueshengxinxi");scanf("%d%s%s%d%d%d",&st[n].num,st[n].name,st[n].sex,&st[n].score[0],&st[n].score[1],&st[n].score[2]);st[n].total=st[n].score[0]+st[n].score[1]+st[n].score[2];}答案补充voidmod(structstudentst[],intno,intn){inti;for(i=0;i7、printf("xiugaixueshengxinxi");scanf("%d%s%s%d%d%d",&st[i].num,st[i].name,st[i].sex,&st[i].score[0],&st[i].score[1],&st[i].score[2]);}}}答案补充voidprint(structstudentst[],intn){inti,j;structstudenttemp;for(i=0;ist[j].num){temp=st[i];st[i
8、]=st[j];st[j]=temp;}}}for(i=0;i