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 <iostream>#include <vector>using namespace std; int main() {const int SIZE_LIST = 4;vector<int> keysList(SIZE_LIST);vector<int> 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 << endl; return 0;} Please help me with this problem using c++.

Question

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 <iostream>
#include <vector>
using namespace std;

int main() {
const int SIZE_LIST = 4;
vector<int> keysList(SIZE_LIST);
vector<int> 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 << endl;

return 0;
}

Please help me with this problem using c++.

Expert Answer

1 Rating

Want to see the step-by-step answer?

See Answer

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

See Answer
*Response times vary by subject and question complexity. Median response time is 34 minutes and may be longer for new subjects.

Related Computer Science Q&A

Find answers to questions asked by student like you
Show more Q&A

Q: required program java   Create a class called DuplicateCounter. Create an instance method called cou...

A: Program Instructions:In class DuplicateCounter, declare a map of Strings and create methods count() ...

Q: Can someone help me on solving this? Thank you!

A: For loop:A loop is used repeatedly to execute a sequence of statements until a given condition is fu...

Q: Please put into SOP form~xyz + yz + x~y

A: It is said that a Boolean expression consisting solely of Minterms (product terms) is in the form of...

Q: Write a program that will present the user with a main menu of options which the user can choose fro...

A: Program:import java.util.Scanner;public class Main {publicstaticvoid main(String[] args) {char user_...

Q: First, launch NetBeans and close any previous projects that may be open (at the top menu go to File ...

A: The name of the program is CharCounter.inputEntry is a string type variable and used for storing use...

Q: Hello, I am a novice working with Java. I am creating an amortization schedule (pictured below) and ...

A: Declare and initialize two more double type variable totalamorized and lastamorized.Calculate these ...

Q: You will write 4 classes for Program 5.  Assignment:The BankAccount class models an account of a cus...

A: Java Program:Filename :- BankAccount.java// Import the required packageimport java.util.Date;// Clas...

Q: Construct a truth table for the following: a) xyz + x(yz)' + x'(y+z) + (xyz)'b) (x + y')(x' + z')(y'...

A: Truth table:a. Given Boolean expression:F = xyz + x(yz)’ + x’(y + z) + (xyz)’

Q: How did Cisco systems solve physical security problems?

A: Cisco is a US-based technology corporation best known for its networking services. As a company that...