Question: Using C++ Add each element in origList with the corresponding value in offsetAmount. Print each sum followed by a space. Ex: If origList (4, 5,10,12)

Using C++  Using C++ Add each element in origList with the corresponding value

Add each element in origList with the corresponding value in offsetAmount. Print each sum followed by a space. Ex: If origList (4, 5,10,12) and offsetAmount (2, 4,7, 3), print: 6 9 17 15 5 int mainO 6 const int NUM VALS-4 7int origList[NUM VALS] 8 int offsetAmount [NUM VALS] 9 nt ; 10 11 origlist[0] 20; 12 origlist[1]-30; 13 origlist[2] -40; 14 origlist[3] 50; 15 16 offsetAmount[0]-4; 17 offsetAmount [1] -6; 18 offsetAmount[2] = 2; 19 offsetAmount [3]-8; 20 21 * Your solution goes here/ 23 Cout

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!