- 1、本文档共6页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
求一个用C语言写的学生信息管理系统源代码
#define N 1000#define M 3#includestdio.h#includestdlib.hstruct student{ int num; char name[10]; char sex[4]; int score[M]; int total;};void input(struct student st[],int n){ int i; for(i=0;in;i++) { 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]); printf(\n); } for(i=0;in;i++) { st[i].total=st[i].score[0]+st[i].score[1]+st[i].score[2]; }}void sort_sum(struct student st[],int n){ int i,j; struct student temp; for(i=0;in-1;i++) { for(j=i+1;jn;j++) { if(st[i].totalst[j].total) { temp=st[i]; st[i]=st[j]; st[j]=temp; } } }}void seek_1(struct student st[],int no,int n){ int i,j,low,mid,high; struct student temp; for(i=0;in-1;i++) { for(j=i+1;jn;j++) { if(st[i].numst[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(nost[mid].num) { low=mid+1; } else if (nost[mid].num) { high=mid-1; } else { printf(num:%d,name:%s,sex:%s,score:%d,%d,%d,total:%d\n,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; } }}void seek_2(struct student st[],int no,int n){ int i; for(i=0;in;i++) { if(no==st[i].num) { printf(num:%d,name:%s,sex:%s,score:%d,%d,%d,total:%d\n,st[i].num,st[i].name,st[i].sex,st[i].score[0],st[i].score[1],st[i].score[2],st[i].total); } }}void del(struct student st[],int no,int n){ int i,j; for(i=0;in-1;i++) { if(no==st[i].num) { for(j=i;jn-1;j++) { st[j]=st[j+1]; } } }}
答案补充
void ins(struct student st[],int n){ printf(shuru xuesheng xinxi\n); 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];}
答案补充
void mod(struct student st[],int no,int n){ int i; for(i=0;in;i++) { if(no==st[i].num) {
您可能关注的文档
- 模糊限制语的语用学分析- A Pragmatic Analysis of Hedges in English News.doc
- 橡胶周报4.22.pdf
- 模电常用半导体小结.doc
- 模具设计与制造第三章.ppt
- 欣锐(HS系列)电源IC资料HS210-4N01电源.ppt
- 欧姆定律计算题总结.doc
- 橱柜的设计图解.doc
- 模电五版第05章习题.pdf
- 欠平衡录井技术.doc
- 歌曲写作第四节.ppt
- 中国人民银行[1].pptx
- 中国人民银行法律制度.pptx
- 五上语文【重难知识归纳】.pdf
- CECS14-2002 游泳池和水上游乐池给水排水设计规程建筑工程图集 conv.docx
- CECS94-2002 建筑排水用硬聚氯乙烯螺旋管管道工程技术规程建筑工程图集 conv.docx
- 湖职院水利水电工程施工技术教案09混凝土建筑物施工.doc
- PEP三年级英语下册教学课件 Unit 6 Number in life B Read and write.pptx
- PEP三年级英语下册教学课件 Unit 6 Number in life A Let's learn & Listen and chant.pptx
- PEP三年级英语下册教学课件 Unit 5 Old toys B Read and write.pptx
- 部编版一年级语文上册 第三单元6 j q x【交互版】.pptx
最近下载
- 存储网络配置指导华为oceanstor sns2124 2224 2248 3096 5192 5384产品概述.pdf VIP
- YB∕T 4001.3-2020- 钢格栅板及配套件 第3部分:钢格板楼梯踏板.pdf VIP
- 中国钢结构制造企业资质管理规定(暂行).pdf
- VTE的治疗与预防.pptx VIP
- (公共英语等级考试三级大纲词汇4107个记忆情况.doc VIP
- [医疗机构设置审批有关规定.doc VIP
- 建设工程档案管理课件.ppt VIP
- DD 2019-02 固体矿产地质调查技术要求(1:50000).pdf VIP
- xx太阳能发电公司50MWp光伏电站项目安全设施设计专篇.pdf VIP
- 物业管理单位服务费用测算明细表.pdf VIP
文档评论(0)