1033: Array input exercise

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:177 Solved:69

Description

Write a C program that accepts N+1 (N <= 10000) integers from key board and show the entire array in the reversed order. 
The format of the input follows 

N a1 a2 a3 .... an

in which N is the number of elements in an array and a1, a2, a3, ... an are the elements in an array
and the output shall display
 
an, .... a3,a2,a1

For example, 
Input: 
5
-1
0
1
2
3
Output: 3,2,1,0,-1
 
 

Input

5
-1
0
1
2
3

Output

3,2,1,0,-1

Sample Input Copy

5
0
7
3
55
100

Sample Output Copy

100,55,3,7,0

HINT

You can prepare an array of which the size is large enough and use it to store data. Notice that the size of an array cannot be defined by a variable.