C PROGRAM TO REPLACE EVERY ELEMENT WITH SUM OF ITS OTHER ELEMENT
Answers
Answered by
0
Answer:
Input: arr[] = {5, 1, 3, 2, 4}
Output: 10 14 12 13 11
Original array {5, 1, 3, 2, 4}
Encrypted array is obtained as:
= {1+3+2+4, 5+3+2+4, 5+1+2+4, 5+1+3+4, 5+1+3+2}
= {10, 14, 12, 13, 11}
Each element of original array is replaced by the
sum of the remaining array elements.
Input: arr[] = {6, 8, 32, 12, 14, 10, 25 }
Output: 101 99 75 95 93 97 82
Similar questions
English,
1 month ago
Computer Science,
1 month ago
English,
2 months ago
Math,
2 months ago
Math,
9 months ago