subject

C++ Add each element in origList with the corresponding value in offsetAmount. Print each sum followed by a semicolon (no spaces). Ex: If origList = {4, 5, 10, 12} and offsetAmount = {2, 4, 7, 3}, print:
6;9;17;15;

#include
#include
using namespace std;

int main() {
const int NUM_VALS = 4;
int origList[NUM_VALS];
int offsetAmount[NUM_VALS];
int i;

cin >> origList[0];
cin >> origList[1];
cin >> origList[2];
cin >> origList[3];

cin >> offsetAmount[0];
cin >> offsetAmount[1];
cin >> offsetAmount[2];
cin >> offsetAmount[3];

/* Your code goes here */

cout << endl;

return 0;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:40
Nims is applicable to all stakeholders with incident related responsibilities. true or false
Answers: 1
question
Computers and Technology, 22.06.2019 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
question
Computers and Technology, 22.06.2019 15:20
This os integrated the processing power of windows nt with the easy-to-use gui of windows 98. windows 2000 windows 3.11 windows for workgroups windowa millennium edition
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
While inserting images, the picture command is usually used to insert photos from a digital camera, and the clip art command is usually used to a.edit the sizes and other characteristics of photos that have been inserted. b.take a screenshot of an image and copy it to the clipboard for pasting. c.search for drawings or other images from a library of prepared pictures. d.make illustrations using lines and shapes that are easy to manipulate.
Answers: 1
You know the right answer?
C++ Add each element in origList with the corresponding value in offsetAmount. Print each sum follow...
Questions
question
Mathematics, 26.11.2019 09:31
question
Physics, 26.11.2019 09:31
question
Mathematics, 26.11.2019 09:31
question
Mathematics, 26.11.2019 09:31
question
Biology, 26.11.2019 09:31
question
Mathematics, 26.11.2019 09:31
question
Mathematics, 26.11.2019 09:31
question
Geography, 26.11.2019 09:31
question
Social Studies, 26.11.2019 09:31
Questions on the website: 13722362