#T534. 数组逆序重存放
数组逆序重存放
Description
Reverse the order of elements in an array. For example, if the original order is 8, 6, 5, 4, 1, it should be changed to 1, 4, 5, 6, 8.
Input Format
The input consists of two lines:
- The first line contains the number of elements
nin the array (1 < n < 100). - The second line contains
nintegers separated by spaces.
Output Format
The output is a single line: the reversed array of integers, with each integer separated by a space.
5
8 6 5 4 1
1 4 5 6 8
Source
CodesOnline