Print an Array in Reverse
easyQuestion 220You 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
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 (p, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.