C++ For any element in keysList with a value greater than 40, printthe corresponding value in itemsList,
Fantastic news! We've Found the answer you've been seeking!
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 = {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;
}
Related Book For
John E Freunds Mathematical Statistics With Applications
ISBN: 9780134995373
8th Edition
Authors: Irwin Miller, Marylees Miller
Posted Date: