โ Back to Arrays
Question 55
Array Sorted Order
Array Sorted Order
Write a program that reads exactly 5 integers into an array. Determine whether the array is sorted in non-strict ascending order or non-strict descending order. Output exactly one of the following strings: Is Ascending Is Descending No sorted order Test your program with inputs that produce each of the three outputs to confirm it works as intended.
Expected Output:
Is Ascending
Topics:
Arrays
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.