CJCoding With Joseph
15per day

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
๐Ÿ“ฅ Auto-Input:
1 2 2 4 5\n
This input is automatically fed to your program's stdin
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.