CJCoding With Joseph
15free / daySign inCreate account

Print an Array in Reverse

You can walk an array backwards by starting your loop counter at the last index (size - 1) and counting down to 0. In this exercise, print the five numbers from last to first, separated by single spaces, with no trailing space at the end. This teaches you to iterate an array in the opposite direction.

Expected Output:

5 4 3 2 1

= newline. No newline after the last line.

Hints4 available
Topics:
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 (p, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.