Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Integer dataSize is read from input. Then, integers and strings are read and stored into integer vector quantityList and string vector shadeList, respectively. Lastly, integer quantityAsked is read from input. Find quantityAsked in quantityList and output the following: "The quantity " the value of quantityAsked " is matched with shade " the element in shadeList at the index of quantityAsked in quantityList ", found at index " the index of quantityAsked in quantityList End with a newline. Ex: If the input is: 456 aqua 10 black 48 salmon 83 olive 56 Then the output is: The quantity 56 is matched with shade aqua, found at index 0 Note: quantityAsked is an element in quantityList.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions