Given an array a of n numbers (integers), you have to write a program which prints the sum of the elements of array a with the corresponding elements of the reverse of array a.
Answers
Answered by
0
Given an array A of N numbers, you have to write a program which prints the sum of the elements of array A with the corresponding elements of the reverse of array A. If array A has elements [1,2,3], then reverse of the array A will be [3,2,1] and the resultant array should be [4,4,4].
Input Format:
The first line of the input contains a number N representing the number of elements in array A. The second line of the input contains N numbers separated by a space. (after the last elements, there is no space)
PLEASE MAKE ME AS A BRAINLIST ANSWER
Similar questions
English,
5 months ago
Chemistry,
5 months ago
Hindi,
5 months ago
Math,
10 months ago
Political Science,
10 months ago
Social Sciences,
1 year ago
English,
1 year ago