Given an array of N elements (N<=100)
Write a program that performs a right cyclic shift of even-numbered elements (element numbering starts from 0)
Input
On the first line, enter the value
N
. Next, on the second line, enter
N
numbers
Imprint
Output all elements of the converted array.
Examples
# |
Input |
Output |
1 |
5
1 2 3 4 5
|
5 2 1 4 3
|