Question: Integer inputSize is read from input. Then, inputSize pairs of strings and integers are read and stored into string vector customerList and integer vector tagList,

Integer inputSize is read from input. Then, inputSize pairs of strings and integers are read and stored into string vector customerList and integer vector tagList, respectively. Lastly, string customerAsked is read from input. Complete the following tasks:
Initialize sumTag with 0.
Use a loop to find the sum of the elements in tagList where the corresponding element in customerList is equal to customerAsked. For each element in customerList that is equal to customerAsked, output "Index " followed by the element's index. End with a newline.

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 Programming Questions!