← 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 these three strings:Is Ascending,Is DescendingorNo sorted order. Test your program with inputs that produce each of the three outputs to confirm it works as intended.
Expected Output:
Is Ascending= newline. No newline after the last line.
Hints4 available
Sign in to use hintsTopics:
Arrays
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · 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.