Modify the program from exercise 19 so that when you enter an integer, the program will output
Question:
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 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:
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
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...
-
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...
-
2. LIMIT COMPARISON TEST: SPECIAL CASES The Limit Comparison Test is most often used when the limit L= lim ak lies in the interval (0, oo). In the case where L is zero or infinity, we can still...
-
(a) In control theory, a 'feedback control' mechanism is one which supplies information to determine whether corrective action should be taken to re-establish control of a system. (i) Illustrate by...
-
Assumethatasimplerandomsamplehasbeenselectedfromanormallydistributedpopulationandtestthegivenclaim.UseeitherthetraditionalmethodorP-valuemethodasindicated.Identifythenullandalternativehypotheses,tests...
-
Why is It important to evaluate corporate strategies? LO1
-
Return on investment ( ROI) is computed in the fol-lowing manner: ROI is equal to turnover multiplied by earnings as a percent of sales. Turnover is sales divided by total investment. Total...
-
Vaughn Company expects to produce 1.266,000 units of Product XX in 2020. Monthly production is expected to range from 83,000 to 123,000 units. Budgeted variable manufacturing costs per unit are...
-
The balance sheet of Confucius Book Shop at April 30, 2014, is as follows: Chennai Cain, the owner of the book shop, admits that he is not an accountant. In fact, he couldn't get the balance sheet to...
-
What can you do to an int that you cannot do to a string?
-
What can you do to a string that you cannot do to an int?
-
In Review Question 7.14, how did you implement the ON UPDATE referential integrity action? Why?
-
What is an incident in which a famous person wore or used a product (not as part of a paid endorsement or ad) and it caused a buying frenzy. Explain how the manufacturer or service provider reacted
-
What is a "heavyweight project team" and how does it differ from the traditional approach used for organizing development projects at Eli Lilly?This consists of two issues:First, an evaluation of the...
-
Consider the closed-loop system shown in Figure P11.6, where the transfer function of the process is that of a second-order system, i.e. k Ts +25TS +1 G,(s)= Y sp(s) E(s) U(s) Y(s) Ge(s) Gp(s) Figure...
-
1. Do you feel we have come along way with inventory in 10 years? 2. How did COVID affect the supply chain in your current hospital? Were any of the inventory systems/topics used, or relevant or...
-
Identify at least one way in which your writing skills have improved this semester and reflect on how you might use this skill in your career. You can include research, presentation, and report...
-
Simplify each of the following. $54/0.12 (225/365)
-
Refer to Example 9.15. Add the following functionality to this program: Allow the user to enter the cost of a gallon of gas on each trip and use a function, Cost() to calculate the cost of purchasing...
-
Suppose Alice has picked three distinct integers and placed them into a stack S in random order. Write a short, straightline piece of pseudocode (with no loops or recursion) that uses only one...
-
Augment the ArrayQueue implementation with a new rotate( ) method having semantics identical to the combination, enqueue(dequeue( )). But, your implementation should be more efficient than making two...
-
Repeat the previous problem using the deque D and an initially empty stack S. Previous problem Suppose you have a deque D containing the numbers (1,2,3,4,5,6,7,8), in this order. Suppose further that...
-
explain the concept of Time Value of Money and provide and example. In addition to your discussion, please explain the differences between Stocks and Bonds
-
Wildhorse Inc. has just paid a dividend of $3.80. An analyst forecasts annual dividend growth of 9 percent for the next five years; then dividends will decrease by 1 percent per year in perpetuity....
-
Jenny wanted to donate to her alma mater to set up a fund for student scholarships. If she would like to fund an annual scholarship in the amount of $6,000 and her donation can earn 5% interest per...
Study smarter with the SolutionInn App