Question: C++ For any element in keysList with a value greater than 40, printthe corresponding value in itemsList, followed by a comma (nospaces). Ex: If keysList

C++

For any element in keysList with a value greater than 40, printthe corresponding value in itemsList, followed by a comma (nospaces). Ex: If keysList = {32, 105, 101, 35} and itemsList = {10,20, 30, 40}, print: 20,30,

#include
#include
using namespace std;

int main() {
const int SIZE_LIST = 4;
int keysList[SIZE_LIST];
int itemsList[SIZE_LIST];
int i;

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

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

/* Your code goes here */

cout << endl;

return 0;
}

Step by Step Solution

3.39 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

C program to input values into keysList and itemsList and then for every element in ... View full answer

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 Electrical Engineering Questions!