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, 23.06.2019 12:30
Animations and transitions are added from the
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 23.06.2019 18:50
What is transmission control protocol/internet protocol (tcp/ip)? software that prevents direct communication between a sending and receiving computer and is used to monitor packets for security reasons a standard that specifies the format of data as well as the rules to be followed during transmission a simple network protocol that allows the transfer of files between two computers on the internet a standard internet protocol that provides the technical foundation for the public internet as well as for large numbers of private networks
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
The keyboard usually has six rows of keys. which of the following is not one of the key group categories? letter keys number keys control keys graphic keys
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, 25.01.2021 07:00
question
Mathematics, 25.01.2021 07:00
question
English, 25.01.2021 07:00
Questions on the website: 13722363