Sorting numbers in ascending order
PHP
Easy
sorting
Task «Sorting numbers in ascending order»
Write a program that reads integers separated by spaces and outputs them in ascending order. If numbers repeat, preserve their count. The input contains no more than 1000 numbers, each number does not exceed 1000 in absolute value.
Input Format
In the first line, you are given the number n (1 ≤ n ≤ 1000) — the count of numbers. In the second line, n integers are listed separated by spaces.
Output Format
Output the sorted numbers in ascending order, separated by spaces.
main.php