Question: Integer dataSize is read from input. Then, strings and integers are read and stored into string vector foodList and integer vector quantityList, respectively. Lastly, integer

Integer dataSize is read from input. Then, strings and integers are read and stored into string vector foodList and integer vector quantityList, respectively. Lastly, integer quantityThreshold is read from input.
Set matchesFound with the number of element pairs with a quantity less than quantityThreshold.
Output the food of each pair found with a quantity less than quantityThreshold. End with a newline.
Ex: If the input is:
4
zucchini 61 lettuce 31 melon 73 leek 67
68
Then the output is:
zucchini
lettuce
leek
Total: 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!