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

PROGRAMMING:Select sort

Luz5年前 (2021-05-10)题库384
This problem requires reading in n integers from the keyboard and sorting these integers. Output the result of each step and the final result.
###Input format:
The first line of input is a positive integer n, which means there will be n integers in the second line.
###Output format:
Output the result of each step and the final result.
###Input example:
Here is a set of inputs. For example:
```in
five
3 7 2 9 1
```
###Output example:
The corresponding output is given here. For example:
```out
step 1: 1 7 2 9 3
step 2: 1 2 7 9 3
step 3: 1 2 3 9 7
step 4: 1 2 3 7 9
sorted array: 1 2 3 7 9
```
###Note:
Output colon: is the symbol of English input method, there is a space after the colon. There is a space after each integer< br>





answer:If there is no answer, please comment