CJCoding With Joseph

Sort an Array Ascending

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:
1 2 3 5 8

Expected Output:

1 2 3 5 8
Topics:
Arrays
๐Ÿ“ฅ Auto-Input:
5\n5 3 8 1 2\n
This input is automatically fed to your program's stdin
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.