Print Array in Reverse

4

26 votes
Very-Easy
Problem

Given the size and the elements of array A, print all the elements in reverse order.

Input:
First line of input contains, N - size of the array.
Following N lines, each contains one integer, i{th} element of the array i.e. A[i].

Output:
Print all the elements of the array in reverse order, each element in a new line.

Constraints:

  • 1N100
  • 0A[i]1000
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?