Given an array of numbers I, write a program to find the sum of remaining in the array and display the new array. the first line specifies the no of elements in the array followed by the elements in the array in the second line.
Sample input: 4 1 2 3 4
Output: 9,8,7,6
Constraints: 1<=|A|<=50 1<=i<=100
Explanation: add all the elements except the first element for the first digit, and all elements except 2nd element for the 2nd and so on. 2+3+4=9 is the first digit of the o/p.
0 Answer(s)