For any element in keysList with a value greater than 100, print the corresponding value in itemsList, followed by a space. Ex: If keysList = {42, 105, 101, 100} and itemsList = {10, 20, 30, 40}, print:20 30 Since keysList.at(1) and keysList.at(2) have values greater than 100, the value of itemsList.at(1) and itemsList.at(2) are printed.
#include #include using namespace std;int main() { const int SIZE_LIST = 4; vector keysList(SIZE_LIST); vector itemsList(SIZE_LIST); unsigned int i; for (i = 0; i < keyslist.size();="" ++i)=""> cin >> keysList.at(i); } for (i = 0; i < itemslist.size();="" ++i)=""> cin >> itemsList.at(i); } /* Your solution goes here */ cout <> return 0;}
int main() { const int SIZE_LIST = 4; vector keysList(SIZE_LIST); vector itemsList(SIZE_LIST); unsigned int i; for (i = 0; i < keyslist.size();="" ++i)=""> cin >> keysList.at(i); } for (i = 0; i < itemslist.size();="" ++i)=""> cin >> itemsList.at(i); } /* Your solution goes here */ cout <> return 0;}
for (i = 0; i < keyslist.size();="" ++i)=""> cin >> keysList.at(i); }
for (i = 0; i < itemslist.size();="" ++i)=""> cin >> itemsList.at(i); }
/* Your solution goes here */
cout <>
return 0;}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here