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 06:30
Requirement types discussed during software development include functional and color scheme nonfunctional and code style constraint and nonfunctional fashionable and functional.
Answers: 2
question
Computers and Technology, 22.06.2019 15:30
Melissa needs to add a topic to an email that she will send to her teacher. choose the name of the field where she should type her topic.
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
Apart from confidential information, what other information does nda to outline? ndas not only outline confidential information, but they also enable you to outline .
Answers: 1
question
Computers and Technology, 25.06.2019 21:30
What are the functions of system software
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
History, 15.12.2020 21:20
question
Mathematics, 15.12.2020 21:20
Questions on the website: 13722361