CJCoding With Joseph
15free / daySign inCreate account

Read an integer N, then N integers into an array. Sort the array in ascending order (for example using bubble sort), then print all elements on one line separated by single spaces.

Example: input '5' then '5 3 8 1 2' prints the output shown in Expected Output.

Expected output

1 2 3 5 8

= newline. No newline after the last line.

Hints4 available
Topics
Arrays
Auto-input
5\n5 3 8 1 2\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.