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...
-
Why is the mantle thought to be solid?
-
Using the carpet plots of Figure 7.58, select the percentages of \(0^{\circ}, \pm 45^{\circ}\), and \(90^{\circ}\) plies that are needed in a \(\left[0_{i} / \pm 45_{i} / 90_{k} ight]\) laminate if...
-
Complete the profit margin, asset turnover, and return on investment calculations for investment centers D and V. (Round to two decimalplaces.) Center D $1,600 $400 $3,200 Center V $2,000 $200 $1,250...
-
Helix Corporation uses the weighted-average method of process costing. It produces prefabricated flooring in a series of steps carried out in production departments. All of the material used in the...
-
Floras Fabulous Fountains (FFF) top product is its Model A. Using the information given, draw the product structure tree for the ModelA. Usage Lead Immediate per Time Beginning Parent Parent (weeks)...
-
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?
-
Under the Federal Unemployment Tax Act, all state unemployment compensation systems were dismantled. True/False
-
What kinds of goals work best to build a team?
-
What is the most appropriate size for a decision-making group?
-
An automobile plant in a small town is rescued by Japanese ownership and an imported management team. Analyze this for teamwork and team building in the context of cultural differences. How do...
-
Is brainstorming a more effective creative process than nominal group technique?
-
Average but intriguing story about the human race being infected with small parasitic aliens called souls. Analyze from a systems perspective the isolated cave-dwelling humans who have created a...
-
On September 1, 2016, Beaconsfield Corporation grants Albert a nonqualified stock option to acquire 500 shares of the company's stock for $8 per share. The fair market value of the stock on the date...
-
Which property determines whether a control is available to the user during run time? a. Available b. Enabled c. Unavailable d. Disabled
-
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...
-
J is going to receive a 30-year annuity of 8,500 and L is going to receive perpetuity of 8,500. If the appropriate interest rate is 6%, how much more is L's cash flow worth?
-
. Assume that over the past 88 years, U.S. Treasury bills had an average return of 3.5% as compared to 6.1% on long-term government bonds. What was the average risk premium on the long-term...
-
The following data were gathered to use in reconciling the bank account of Bradford Company: Balance per bank $ 18,050 Balance per company records 10,040 Bank service charges 50 Deposit in transit...
Study smarter with the SolutionInn App