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

PROGRAMMING:6-6 bubble sort

Luz5年前 (2021-05-10)题库472
6-6 use bubble sort algorithm to sort and output the given n integers from small to large.
###Input format:
Enter an integer n in the first line, and then enter n integers in the second line, separated by spaces.
###Output format:
Output these n integers from small to large in one line, separated by spaces in the middle, and there is no space after the last integer.
###Input sample 1:
Here is a set of inputs. For example:
```in
five
6 5 4 8 9
```
###Output sample 1:
The corresponding output is given here. For example:
```out
4 5 6 8 9
```
###Input sample 2:
Here is a set of inputs. For example:
```in
one
six
```
###Output sample 2:
The corresponding output is given here. For example:
```out
six
```







answer:If there is no answer, please comment