-->
当前位置:首页 > 题库

PROGRAMMING:Ranking of student achievement

Luz5年前 (2021-05-10)题库483
Assuming that the basic information of students includes student number, name, three course scores and personal average score, a structure type that can represent the information of students is defined. Input the score information of n (n < 50) students and output their information from high to low according to their personal average score. If the average scores are the same, they are listed in the order of input.
###Input format:
Enter a positive integer n (n < 50), and enter the information of n students in the following N lines, including student number, name and three course scores (integer).
###Output format:
Output student information sorted from high to low, including student number, name and average score (two decimal places reserved).
###Input example:
```in
three
101 Zhang 78 87 85
102 Wang 91 88 90
103 Li 75 90 84
```
###Output example:
```out
102,Wang,89.67
101,Zhang,83.33
103,Li,83.00
```







answer:If there is no answer, please comment