## Algorithm

Problem Name: beecrowd | 1175

# Array change I

Adapted by Neilor Tonin, URI Brazil

Timelimit: 1

Write a program that reads an array N [20]. After, change the first element by the last, the second element by the last but one, etc.., Up to change the 10th to the 11th. print the modified array.

## Input

The input contains 20 integer numbers, positive or negative.

## Output

For each position of the array N print "N[i] = Y", where i is the array position and Y is the number stored in that position.

 Input Sample Output Sample 0 -5 ... 63 230 N[0] = 230 N[1] = 63 ... N[18] = -5 N[19] = 0

## Code Examples

### #1 Code Example with C++ Programming

```Code - C++ Programming```

``````
#include <cstdio>
int main() {
int vetor[20];
int i;
for (i = 0; i  <  20; i++) {
scanf("%d", &vetor[i]);
}
for (i = 0; i  <  20; i++) {
printf("N[%d] = %d\n", i, vetor[19 - i]);
}
return 0;
}
``````
Copy The Code &

Input

cmd
0 -5 ... 63 230

Output

cmd
N[0] = 230 N[1] = 63 ... N[18] = -5 N[19] = 0

### #2 Code Example with Javascript Programming

```Code - Javascript Programming```

``````
const lines = input.split('\n');

let d = [];
for(var c = 0; c  <  20; c++){
let f = lines.shift();
d.push(f);
}
d.reverse();
for(var g = 0; g  <  20; g++){
console.log(`N[\${g}] = \${d[g]}`);
}
``````
Copy The Code &

Input

cmd
0 -5 ... 63 230

Output

cmd
N[0] = 230 N[1] = 63 ... N[18] = -5 N[19] = 0

### #3 Code Example with Python Programming

```Code - Python Programming```

``````
d = []
for c in range(0, 20):
f = input()
d += [f]
d.reverse()
for g in range(0, 20):
print(f'N[{g}] = {d[g]}')
``````
Copy The Code &

Input

cmd
0 -5 ... 63 230

Output

cmd
N[0] = 230 N[1] = 63 ... N[18] = -5 N[19] = 0