1083: 读入并倒序输出学生信息

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:151 Solved:78

Description

学校登记了n个学生的信息,现要求将这些学生的信息录入到系统中,并按照录入顺序倒序输出来。要求使用结构体实现。
学生信息包括学号、姓名、年龄、学校、分数,操作员也按照这个顺序录入,其中分数精度最多小数点后1位。
结构体定义可参考如下:
struct student
{
  int ID;//学号
  char name[50];//姓名
  int age;//年龄
  char school[500];//学校
  float score;//分数
};



Input

第一行 数字n,代表接下来录入n个学生的信息,每个学生的信息一行 1 <= n <= 100
接下来n行,每行代表一个学生的信息,依次为:学号、姓名、年龄、学校、分数,中间用空格隔开

Output

输出n行,每行代表一个学生的信息,要求按照输入顺序倒序输出

Sample Input Copy

10
1 one 11 shiyanxiaoxue 98.1
2 two 12 shiyanxiaoxue 98.2
3 one 11 shiyanxiaoxue 98.3
4 two 12 shiyanxiaoxue 98.4
5 one 11 shiyanxiaoxue 98.5
6 two 12 shiyanxiaoxue 98.6
7 one 11 shiyanxiaoxue 98.7
8 two 12 shiyanxiaoxue 98.8
9 one 11 shiyanxiaoxue 98.9
10 two 12 shiyanxiaoxue 99

Sample Output Copy

10 two 12 shiyanxiaoxue 99.0
9 one 11 shiyanxiaoxue 98.9
8 two 12 shiyanxiaoxue 98.8
7 one 11 shiyanxiaoxue 98.7
6 two 12 shiyanxiaoxue 98.6
5 one 11 shiyanxiaoxue 98.5
4 two 12 shiyanxiaoxue 98.4
3 one 11 shiyanxiaoxue 98.3
2 two 12 shiyanxiaoxue 98.2
1 one 11 shiyanxiaoxue 98.1

Source/Category