#include<iostream>
#include<iomanip>
#define N 5 //自定义学生数量
using namespace std;
struct student
{
int num;
string name;
int score[3];
double average_score;
};
student stu[N];
void input(student stu[],int n) //输入
{
for(int i=0; i<n; i++){
cout << "NO." << i+1 << " " << endl;
cout << "number: ";
cin >> stu[i].num;

这篇博客介绍了如何使用C++编写程序来输入N个学生的信息,包括学号、姓名和三门课程的成绩,并输出这些信息。同时,程序会找出每科成绩和平均成绩的最高分获得者。博客内容包括结构体定义、输入输出函数以及最高分查找函数的详细实现。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



