โ Back to Arrays
Question 96
Sort an Array Ascending
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
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.