定义结构数组,输入以下学生信息表,计算出每个学生的平均成绩,并按降序排列输出。
| 学号 | 姓名 | 语文 | 数学 | 计算机 | 平均分 |
| 010 | 张三 | 60 | 82 | 72 | |
| 102 | 李四 | 90 | 82 | 65 | |
| 030 | 王五 | 86 | 78 | 90 |
#include#define N 3 struct Stu { char num[4]; char name[10]; int score[3]; double avg; }; void input(struct Stu s[],int n); void sort(struct Stu s[],int n); void output(struct Stu s[],int n); int main() { struct Stu s[N]; input(s,N); sort(s,N); output(s,N); return 0; } void input(struct Stu s[],int n) { int i; for(i=0;i



