Company: Deloitte_9nov
Difficulty: medium
Add Index to Array Elements Problem Description Write a program to print the elements of an array N after adding each array element to its index value. Index value starts with 0. Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings while reading the input or while printing, as these contribute to the standard output. Input Format: The first line of input contains N, the size of the array. The second line of input contains the array elements, each separated by single whitespaces. Output Format: A single line of output should print the modified array elements, each separated by single white spaces. Examples Example 1: Input: 7 1 2 3 4 5 6 7 Output: 1 3 5 7 9 11 13 Explanation: Given, N= 7, and the array elements are 1, 2, 3, 4, 5, 6, and 7. So by adding the index value to every number of the list, we will get: 1+0=1 2+1=3 3+2=5 4+3=7 5+4=9 6+5=11 7+6=13 Therefore, print "1 3 5 7 9 11 13" as output. Constraints N > 1 Index value starts with 0.