subject
Computers and Technology, 20.02.2020 20:28 uhhgray

Subtract each element in origList with the corresponding value in offsetAmount. Print each difference followed by a space.
Ex: If origList = {4, 5, 10, 12} and offsetAmount = {2, 4, 7, 3}, print:

2 1 3 9
#include
#include
using namespace std;

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

origList[0] = 40;
origList[1] = 10;
origList[2] = 30;
origList[3] = 20;

offsetAmount[0] = 2;
offsetAmount[1] = 3;
offsetAmount[2] = 6;
offsetAmount[3] = 5;

/* Your solution goes here */

cout << endl;

return 0;
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:40
Hello my name is mihai and i need your : )i have to do a python project in computer science and i’m really busy with my mocks this period of time besides this i’m not good at coding so could someone pls pls pls sort me out ? i actually beg ; ))
Answers: 1
question
Computers and Technology, 22.06.2019 04:30
What kind of software users of all skill levels create web pages that include graphics, video, audio, animation, and other special effects? website authoring website software website publishing website editing
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Will this setup result in what kathy wants to print?
Answers: 2
question
Computers and Technology, 24.06.2019 03:30
The footer area of a web page generally houses which website feature? terms of use web page content business name or title menu headings
Answers: 1
You know the right answer?
Subtract each element in origList with the corresponding value in offsetAmount. Print each differenc...
Questions
question
Mathematics, 23.10.2019 03:50
question
Mathematics, 23.10.2019 03:50
Questions on the website: 13722361