Question: Add each element in origList with the corresponding value in offsetAmount. Print each sum followed by a space. Ex: If origList = {40, 50, 60,

 Add each element in origList with the corresponding value in offsetAmount.

Add each element in origList with the corresponding value in offsetAmount. Print each sum followed by a space. Ex: If origList = {40, 50, 60, 70} and offsetAmount = {5, 7, 3.0}, print: 45 57 63 70 #include int int main(void) const int NUM_VALS = 4; int origList [NUM_VALS]; int offsetAmount [NUM_VALS]; int i = 0; origList [0] = 40; origList [1] = 50; origList [2] = 60; origList [3] = 70; offsetAmount [0] = 5; offsetAmount [1] = 7; offsetAmount [2] = 3; offsetAmount [3] = 0;/* Your solution goes here */

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!