【问题描述】
输入学生姓名,学号,年龄,数据结构课程成绩,按成绩从大到小排序;成绩相同,按学号从小到大排序。使用选择排序
【输入形式】
第一行是一个整数N(N<1000),表示元素个数;接下来N行每行描述一个元素,姓名是长度不超过20的字符串,学号,年龄和成绩都是整型。
【输出形式】
按成绩从小到大输出所有元素,若多个学生成绩相同则成绩相同,则按同学的学号从小到大排序。
【样例输入】
3
Alice 10006 18 98
Bob 10002 19 90
Miller 10005 17 92
【样例输出】
Bob 10002 19 90
Miller 10005 17 92
Alice 10006 18 98
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
using namespace std;
struct student
{
char name[20];
int num;
int age;
int gardes;
};
int main()
{
int n;
cin>>n;
student*s=new student[