- 1
- 0
- 约2.65万字
- 约 28页
- 2017-09-09 发布于江苏
- 举报
学完了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];
????}
??
????p
您可能关注的文档
最近下载
- 雕塑维护方案养护.docx VIP
- 四川省成都市树德实验中学2024-2025学年七年级上学期期末考试道德与法治试题.docx VIP
- 对照不同光质补光对转色期葡萄品质和成分影响的初步探究.docx VIP
- 金属切削原理与刀具 配套课件.ppt
- T∕JNBDA 0009-2025 生殖医学高质量数据集建设规范.pdf VIP
- 上海高考:地理高频考点汇总.doc VIP
- 卫生部手术分级目录(2025年1月份修订).doc VIP
- DB11T 1087-2025公共建筑装饰装修工程质量验收标准.docx VIP
- 小学快乐体育教学活动的研究与实践课题研究报告.docx VIP
- 02S515 排水检查井图集建筑工程图集.docx VIP
原创力文档

文档评论(0)