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...
-
In 2012, Gurney Construction Company agreed to construct an apartment building at a price of $1,200,000. The information relating to the costs and billings for this contract is shown below....
-
A store declares a deep discount of \(40 \%\) for an item, which they say will save \(\$ 30\). What was the original price of the item?
-
Ridenour Ltd. is preparing its first-quarter monthly cash budget for 2011. The following information is available about actual 2010 sales and expected 2011 sales: Tracing collections from prior year...
-
please solve answers . I need help with question 3 and 5 . I just need help with question 3. Calculate the price per 100mL for each package size of POP and determine which the best buy is. (4 marks)...
-
The television shows being watched by households surveyed by Nielsen Media Research. Qualitative versus Quantitative Data. In Exercises, determine whether the data described are qualitative or...
-
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?
-
Demonstrate that an at-the-money call option on a given stock must cost more than an at-the money put option on that stock with the same maturity. The stock will pay no dividends until after the...
-
Why do you demand money? What determines how much money you keep in your pocket, purse, or bank accounts?
-
Statements of cash flow are prepared after the end of an accounting period. What technique could a business use to plan future cash movements and balances?
-
Shareholders in companies are protected by limited liability, which is a long-standing principle Why do you think shareholders are given the benefit of this protection?
-
If a company has retained profits over a number of years, does this mean that the company must have large cash balances as a result?
-
What are the implications of requiring the auditor to seek reappointment on an annual basis?
-
Compare the environmental impact of the five different modes of transportation?
-
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...
-
Under federal law, an electronic document is as valid as a paper document, without exceptions. True False
-
According to David McClelland, a person with a strong power need is competitive, wants to win, and likes conflict. Question 3 8 options: True False
-
In circumstances under which a person or business is held liable as a principal, even though no actual (express) agency has been created with an agent, but there is appearance of an agency...
Study smarter with the SolutionInn App