โ Back to Arrays
Question 173
Is the Array Sorted
Is the Array Sorted
An int array is given. Print 'Sorted' if every element is less than or equal to the next (ascending), otherwise 'Not sorted'.
For { 1, 3, 5, 7 } the program prints 'Sorted'.Expected Output:
Sorted
Topics:
Arrays
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.