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:
zucchini lettuce melon leek
Then the output is:
zucchini
lettuce
leek
Total:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
