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

PROGRAMMING:Bubbling

Luz5年前 (2021-05-10)题库503
Brother Honghong recently learned pointer. He felt that this knowledge was a little difficult to understand, so he wanted to master it through programming practice. When he studied arrays (Chapter 7), he had mastered the general writing method of bubble sorting. Now he wants to use pointers to realize the sorting function. But he is in trouble. Can you help him?
Pointer to achieve bubble sort function, function name unified with void bubble sort (int * P, int c).
The concrete method is realized by oneself.
###Input format:
A group of input, the first line is the number of data to be arranged n, the second line is the specific value of the data.
###Output format:
Output sorted number, space between two numbers, space at the end of the last number
###Input example:
Here is a set of inputs. For example:
```in
five
503 87 512 61 908
```
###Output example:
The corresponding output is given here. For example:
```out
61 87 503 512 908
```







answer:If there is no answer, please comment