求教C语言高手一题,答的好重赏

来源:百度知道 编辑:UC知道 时间:2024/05/20 19:25:16
1. 定义一个结构体数组,存放10个学生的学号,姓名,三门课的成绩
2. 从键盘输入10个学生的以上内容
3. 输出单门课成绩最高的学生的学号、姓名、以及该门课程的成绩
4. 输出三门课程的平均分数最高的学生的学号、姓名及其平均分
5. 将10个学生按照平均分数从高到低进行排序,输出结果,格式如下所示:
number name math Chinese English average
103 tom 90 90 100 95
101 alice 90 80 70 80
只要C语言的

我编过一个比较多点功能的
你自己看着改吧

#include <iostream>
#include <cstring>
struct st
{
int no;
char name[20];
int math;
int eng;
int pro;
int sum;
double ave;
};
struct Node
{
st content;
Node *next;
};
void input(st ,Node *&head);
void output(Node *head);
void del(int a,Node *&head);
void out(Node *p);
using namespace std;
Node *head=NULL;
int main()
{
A:
cout << "请不要搞恶,会崩的!!!!\n";
cout << "请输入要求操作的代号\n";
cout << "1 添加新数据。\n";
cout << "2 查找数据。\n";
cout << "3 修改数据。\n";
cout << "4 删除数据。\n";
cout << "5 统计。\n";
cout << "6 说明文档\n";
cout << "7 退出。\n";
int choice;
cin >> choice;
switch (choi