Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in C++ 19. Write a program where you first enter a set of name-and-value pairs, such as Joe 17 and Barbara 22. For each pair,

in C++ image text in transcribed
image text in transcribed
19. Write a program where you first enter a set of name-and-value pairs, such as Joe 17 and Barbara 22. For each pair, add the name to a vector called names and the number to a vector called scores (in corresponding positions, so that if names[7]=="]oe" then scores[7]==17). Terminate input with NoName 0 . Check that each name is unique and terminate with an error message if a name is entered twice. Write out all the (name,score) pairs, one per line. 20. Modify the program from exercise 19 so that when you enter a name, the program will output the corresponding score or name not found. 21. Modify the program from exercise 19 so that when you enter an integer, the program will output all the names with that score or score not found. additional comments: do each of the exercises is a separate function, i.e. \#19: define a function getData(vector string names, vector int scores) \#20: define a function getScore(vector names, vector int > scorex) \#21: define a function getNames(vector names, vector int > scores) Do not forget to declare vectors before function getData

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

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

Problem 3 Show that L {w E {a,b,c)" : na(w)

Answered: 1 week ago

Question

What are the HR forecasting techniques?

Answered: 1 week ago

Question

=+ Are unions company-wide, regional, or national?

Answered: 1 week ago

Question

=+j Explain the litigation risks in international labor relations.

Answered: 1 week ago

Question

=+j What rules will apply to the process of negotiations?

Answered: 1 week ago