Question: nteger inputSize is read from input. The remaining input alternates between strings and integers. Declare string vector hueList and integer vector quantityList, each with inputSize

nteger inputSize is read from input. The remaining input alternates between strings and integers. Declare string vector hueList and integer vector quantityList, each with inputSize elements. Then, read and store all the strings into hueList and all the integers into quantityList.
Ex: If the input is:
4
teal 30 lavender 35 violet 56 red 41
Then the output is:
Hue: teal, Quantity: 30
Hue: lavender, Quantity: 35
Hue: violet, Quantity: 56
Hue: red, Quantity: 41

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!