程序能输入5个学生的10科成绩,计算出每学生10科的总分和平均分,统计每人小于60分和大于60的科目数

来源:百度知道 编辑:UC知道 时间:2024/05/17 20:53:24

#include<iostream>
using namespace std;
class Student{
private:
double subject_score[10];
double total,average;
int past,none_past;
public:
void get_score();
void display();
};
void Student::get_score(){
past=none_past=total=0;
cout<<"Please Input scores (10):"<<endl;
for(int i=0;i<10;i++){
cin>>subject_score[i];
total+=subject_score[i];
if(subject_score[i]<60)
none_past++;
else
past++;
}
average=total/10;
}
void Student::display(){
cout<<"This student'score:"<<endl;
for(int k=0;k<10;k++)
cout<<subject_score[k]<<" ";
cout<<endl;
cout<<"the total is: "<<total<<endl<<"the average is: "<<average<<endl;
cout<<"<60: "<<none_past&

程序能输入5个学生的10科成绩,计算出每学生10科的总分和平均分,统计每人小于60分和大于60的科目数 C++编程:程序实现:用户依据提示依次输入5个学生的姓名和成绩, 编写一个程序,输入N个学生的成绩,输出高于平均成绩的学生的学号和成绩. 输入10个学生5门功课的成绩(1)求每个学生的平均成绩(2)求每门功课的平均成绩 编写一个程序,输入N个学生的成绩,输出高于平均成绩的学生的学号和成绩,其中学号和 输入存放5个学生成绩计算学生总成绩,平均成绩,高于平均成绩 输入10个学生的5门课成绩,用函数实现下列功能:计算每个学生平均分。 1、编写一个程序,输入N个学生数据,包括学号、姓名、成绩,要求只输出成绩在90分以上的学生数据。 c语言:输入10个学生成绩存储在数组中,求成绩最高者的序号和成绩 程序:用数组,输入全班学生(不超过10人)的学号与4科成绩,把成绩从高到低排序后,输出成绩表