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

PROGRAMMING:students' scores(1)

Luz5年前 (2021-05-10)题库611
Input n scores from keyboard `(n ≤ 10,0 ≤ score ≤ 100)` , ending by a negative value.
After input values, you should finish the following tasks:
1. sort the scores;
1. statistic and output the failed scores and the number of the failed students;
1. find the maxmuim and minimuim score.
###Input format:
Input n integer number, separate by one space.
1. if the number of integer more than 10, only manipulate the previous 10 scores;
1. if the score is greater than 100, the value will be regarded to invalid;
1. if the score is less than 0, input will be finished.
###Output format:
1. the first line: output the sorted scores in descending order, separate by one space. No space behind the last value.
1. the next line: output the failed scores in descending order, the last value is the number of failed scores, separate by one space. No space behind the last value.
1. the last line: output the maxmuim and minimuim score, separate by one space. No space behind the last value.
###Input example:
```in
85 55 90 75 88 70 65 45 -1
```
###Output example:
```out
90 88 85 75 70 65 55 45
55 45 2
90 45
```







answer:If there is no answer, please comment