一个结构体数组中存放有若干学生的信息,每个学生有若干门课程的成绩,计算每个学生的平均成绩,并根据平均成绩由高到低的顺序输出每个学生的学号、姓名、和平均成绩(下面的代码里面用指针的三种表示方法实现输出);
#include <iostream>
using namespace std;
#include <string>
struct student{
string num;
string name;
int score[3];
double avg;
};
int main()
{
student stu[5]={ {
"2011001","zhao",{
78,65,