C语言学生管理系统四大典例.doc

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
C语言学生管理系统四大典例

学完了C语言,遍了4个学生管理系统的程序 感觉有点儿意思,不过还真的有价值 现在拿出来给大家看看: 一. 某班有最多不超过 30 人(具体人数由键盘输入)参加某门课程的考试,参考例 6.2 、例 6.4 、例 6.5 ,用一维数组作函数参数编程实现如下学生成绩管理: ( 1 ) 录入学生的人数; ?????????? **要求输入提示信息为:Please input total number:\n ?????????? **要求输入数据格式为:%d ( 2 )录入每个学生的学号和考试成绩; ????????? **要求输入提示信息为:Please enter the number and score:\n ????????? **要求输入数据格式为:%ld,%f ( 3 )计算课程的总分和平均分; ????????? **要求输出总分格式为:The total score is: %d\n ????????? **要求输出平均分格式为:The average score is: %d\n ( 4 )按成绩由高到低排出名次表; ???????? **要求输出提示信息为:Sorted result as score decreasing:\n ???????? **要求输出格式为:%ld,%4.0f\n ( 5 )按学号由小到大排出成绩表; ???????? **要求输出提示信息为:Sorted result as number increasing:\n ???????? **要求输出格式为:%ld,%4.0f\n ( 6 )按学号查询学生排名及其考试成绩; ???????? 提示信息:Please input the number you want to search:\n ???????? **如果未查到此学号的学生,提示信息为:The number you input is not exist!\n ???????? **如果查询到该学生,要求输出格式为:The ranking of number %ld is %d, and the score is %4.0f\n ( 7 )按优秀( 90~100 )、良好( 80~89 )、中等( 70~79 )、及格( 60~69 )、不及格( 0~59 ) 5 个类别,统计每个类别的人数以及所占的百分比; ??????? **要求输出提示信息为:perfect\t\tgood\t\tmedium\t\tpass\t\tfail\n ??????? **要求输出人数格式为:%.0f\t\t%.0f\t\t%.0f\t\t%.0f\t\t%.0f\n ??????? **要求输出百分比格式为:%.2f%%\t\t%.2f%%\t\t%.2f%%\t\t%.2f%%\t\t%.2f%%\n ( 8 )输出每个学生的学号、考试成绩,以及课程总分和平均分。 ??????? **要求输出提示信息为:All the numbers and scores are below:\n ??????? **要求输出成绩格式为:%ld,%4.0f\n ??????? **要求输出总分格式为:The total score is: %d\n ??????? **要求输出平均分格式为:The average score is: %d\n #include? stdio.h #define ARR_SIZE 30 ?? void sort(float score[],long num[],int n); void SS(float score[],long num[],int n); int Sea(long num[],int n,long x); ?? int main() { ????float a=0,b=0,c=0,d=0,e=0,score[ARR_SIZE]; ????int n,pos,i,temp,totalscore=0,averagescore; ????long num[ARR_SIZE],x; ????printf(Please input total number:\n); ????scanf(%d,n); ?? ????printf(Please enter the number and score:\n); ????for(i=0;in;i++) ????{ ????????scanf(%ld,%f,num[i],score[i]); ????} ?? ????for(i=0;in;i++) ????{ ????????totalscore=totalscore+score[i]; ????} ?? ????prin

文档评论(0)

shuwkb + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档