/*************************************************************
功能描述:计算学生的最高分,最低分,平均分,标准差,及最高最低分学生人数与学号。
输入参数:n-元素个数
s-存储数据的数组
返 回 值:
其他说明:无
*************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
void input_score(int s[], int n); //将小组中n名同学的成绩输入数组s
int get_max_score(int s[], int n); //返回数组s中n名同学的最高成绩值
int get_min_score(int s[], int n); //返回数组s中n名同学的最低成绩值
double get_avg_score(int s[], int n); //返回数组s中n名同学的平均成绩值
double get_stdev_score(int s[], int n); //返回数组s中n名同学成绩值的标准偏差
int count(int x, int s[], int n); //返回在数组s中n名同学中有多少人得x分(实参给出最高/低时,可以求最高/低成绩的人数)
void output_index(int x, int s[], int n); //在函数中输出数组s中n名同学中得x分的学号(下标)
int main( )
{
int score[50]; //将score设为局部变量,通过数组名作函数参数,传递数组首地址,在函数中操作数组
int num; //小组人数也设为局部变量,
程序设计实训报告 项目2.2
最新推荐文章于 2022-05-11 10:16:11 发布
本次实训主要围绕项目2.2展开,通过实践深入理解了编程原理和技巧,加强了问题解决能力。在项目中,我完成了代码编写、调试和优化,实现了预期功能,同时体验了团队协作的重要性。
摘要由CSDN通过智能技术生成