Modify the program from exercise 19 so that when you enter a name, the program will output
Question:
Modify the program from exercise 19 so that when you enter a name, the program will output the corresponding score or name not found.
Dara from Exercise 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]=="Joe" 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.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 50% (10 reviews)
code in c include using namespace std int main i...View the full answer
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
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. Dara from Exercise 19 Write a program where you first...
-
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...
-
In this project, we will write a program that controls a quiz show, much like the many popular TV shows. The program will read in a group of questions and their multiple choice answers, storing them...
-
Calculate the anion gap for a 58 year old insulin dependent diabetic woman who is admitted to the emergency room in a comatose state Na-135mmol/L K= 3.5 mmol/L CI-102 mmol/L HCO3-= 15mmol/L. Include...
-
Management accounting practice has traditionally focused on techniques to assist organizational decision-making and cost control. In concentrating on the internal environment, the management...
-
The part of the earth with the greatest volume is the a. Inner core b. Outer core c. Mantle d. Crust
-
For a linear viscoelastic material, the creep response under a constant stress is followed by a "recovery response" after the stress is removed at some time, \(t_{0}\). Using the Boltzmann...
-
Identify control activities that Wal-Mart could have implemented for Wal-Mart de Mexico and its other foreign subsidiaries to minimize the likelihood of illegal payments to government officials....
-
CASE STUDY: PROFITS AND THE EVOLUTION OF THE COMPUTER INDUSTRY. When profits in a given industry are higher than in other industries, new firms will attempt to enter that industry. CASE STUDY:...
-
Markus Company's common stock sold for $2.75 per share at the end of this year. The company paid a common stock dividend of $0.55 per share this year. It also provided the following data excerpts...
-
When should you define a separate function for part of a program? List reasons.
-
What can you do to an int that you cannot do to a string?
-
Soto Industries Inc. is an athletic footware company that began operations on January 1, Year 1. The following transactions relate to debt investments acquired by Soto Industries Inc., which has a...
-
Does why we join a group make any difference to the group?
-
Katnis (Jennifer Lawrence) and Peeta (Josh Hutcherson) become enemies of the Capitol and must participate in a second Hunger Games pitting previous winners against each other. Examine the ethics of...
-
If punishment has significant drawbacks, why is it used more frequently than rewards?
-
Can a team identity be established that doesnt conform to the team leaders preference?
-
How are groups and organizations different?
-
On May 10, 2016, Somerton Inc., grants Louise a nonqualified stock option to acquire 700 shares of the company's stock for $11 per share. The fair market value of the stock on the date of grant is...
-
Write the statement to store the contents of the txtAge control in an Integer variable named intAge.
-
When implementing the ArrayQueue class, we initialized f =0 (at line 5 of Code Fragment 6.10). What would happen had we initialized that field to some other positive value? What if we had initialized...
-
Describe how to implement the stack ADT using a single queue as an instance variable, and only constant additional local memory within the method bodies. What is the running time of the push(),...
-
Suppose you have a stack S containing n elements and a queue Q that is initially empty. Describe how you can use Q to scan S to see if it contains a certain element x, with the additional constraint...
-
Image transcription text You encounter a split system that uses R-22 refrigerant and observe the following refrigeration parameters from the unit's control display. The unit is operating in cooling...
-
Calculating Present Values Imprudential, Inc., has an unfunded pension liability of $645 million that must be paid in 25 years. To assess the value of the firm's stock, financial analysts want to...
-
Describe the operating activities of each company noting similarities and difference between COCA COLA & PEPSICO. Identify two economy wide factors and industry wide factors that could impact on the...
Study smarter with the SolutionInn App