CJCoding With Joseph
15free / daySign inCreate account

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 Descending or 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

= newline. No newline after the last line.

Hints4 available
Topics:
Arrays
📥 Auto-Input:
1 2 2 4 5\n
This input is automatically fed to your program's stdin
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.