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: 54% (11 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...
-
age,sex,bmi,children,smoker,region,charges 19,female,27.9,0,yes,southwest,16884.924 18,male,33.77,1,no,southeast,1725.5523 28,male,33,3,no,southeast,4449.462 33,male,22.705,0,no,northwest,21984.47061...
-
What are the ethical implications of this "public display" phenomenon for an organization measuring its performance to see whether corporate strategies are effective? LO1
-
The owner of Genuine Subs, Inc., hopes to expand the present operation by adding one new outlet. She has studied three locations. Each would have the same labor and materials costs (food, serving...
-
THE ANSWERS POSTED FOR THIS QUESTION ARE WRONG! Can some one please look at the question? and DO NOT POST THE PREVIOUS ANSWERS!!!!! TY Lessee enters into a five-year lease of office space on January...
-
As a business analyst in a credit card company, you are asked to analyze Extended Large Credit dataset which includes information of credit card applicants. The upper management of this credit card...
-
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?
-
1. Review Table 18.1. Which definitions of organization culture seem to be most applicable to the culture of Camp Bow Wow? Explain your choice(s). 2. In what ways has Ganahl worked to create an...
-
Which of the five hazardous attitudes do you display most frequently? What can you do to minimize the presence and impact of these attitudes in your life?
-
What brought you to this course? How do you define Black or Blackness? What do you hope to get out of this class? When you think of Black Culture, what is the first thing that comes to mind? [For...
-
1. What is XBRL Taxonomy? How do you as a preparer of financial statement use the XBRL Taxonomy in locating a label for a specific financial element? 2. What are the benefits of adopting XBRL from...
-
What a business can do to protect and minimize the invasion of privacy for their customers? Think of your experience when visiting a website. What do most websites have you agree to before you do...
-
Based on your interest, skill set, or goals what do you typically contribute when working in groups? What do you need others to contribute due to your lack of interest, skill set, or goals? How do...
-
Simplify each of the following. 264/4400 (146/365)
-
Write a while loop that uses an explicit iterator to accomplish the same thing as Exercise 7.3. Exercise 7.3. Write a for-each loop that calls the addInterest method on each BankAccount object in a...
-
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...
-
Kirk and Spock formed the Enterprise Company in 2010 as equal owners. Kirk contributed land held an investment ($50,000 basis; $100,000 FMV), and Spock contributed $100,000 cash. The land was used in...
-
Pedro lives in Puerto Rico and had a net taxable income of $35,000 for the year 20X1. Your gross income totals $60,000. What is Pedro's regular income tax for 20X1? a.$4,620 b.$4,900 c.$2,318 d.$2,520
-
The change in cash is equal to the change in liabilities less the change in equity plus the change in noncash assets. O True False
Study smarter with the SolutionInn App