陣列排序
Description
請撰寫一個程式,讓使用者輸入一串數字後輸出其由小排到大的結果。
Please write a program that allows the user to input a series of numbers and then output the results in ascending order.
Input
輸入包含兩行:
第一行是一個整數 n,(10<=n<=20), n 代表使用者接下來會輸入多少個整數。
�,(10<=�<=20), �
第二行有 n 個整數。
�
The input contains two lines:
The first line is an integer n,(10<=n<=20), n represents how many integers the user will enter next.
�,(10<=�<=20), �
The second line contains n integers.
�
Output
請輸出由小排到大的陣列。
Please output the array from small to large.
Sample Input 1
17
17 8 14 25 7 16 23 25 1 22 3 8 15 2 30 6 13
Sample Output 1
1 2 3 6 7 8 8 13 14 15 16 17 22 23 25 25 30
Sample Input 2
13
24 28 21 22 25 19 6 3 17 22 27 30 16