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

PROGRAMMING:Compare data size and sort by STL

Luz5年前 (2021-05-10)题库399
This topic requires reading in n integers (the number of input numbers is determined randomly according to the input time, and a non numeric value is input as the end of input flag), using STL to compare the data size and sort (ascending from small to large), and then output the sorted data.
###Input format:
Input: enter integer values in a row in turn, and separate each number with a space. The number of input numbers is determined randomly according to the input, and a non numeric value is used as the end of input flag.
###Output format:
First, output a prompt "read in data from standard equipment until the input is non integer data". After inputting a group of numbers, output the sorted numbers, and output all the values in a row from small to large, separated by spaces.
###Input example:
```in
10 3 -2 8 20 -9 e
```
###Output example:
```out
Read data from the standard device until the input is non integer data
-9 -2 3 8 10 20
```







answer:If there is no answer, please comment