An array consisting of n elements is given. Write a program that outputs the array sorted in non-decreasing order.
The first line contains a natural number, n(1≤n≤1000).
The second line contains n numbers separated by spaces, ai(1≤ai≤1000).
The sorted array in a single line.
5 3 1 2 5 4
1 2 3 4 5
Login to be able to submit.