The C++ code in Figure 6-39 should display one of the four messages listed in the figure.
Question:
The C++ code in Figure 6-39 should display one of the four messages listed in the figure. The appropriate message is based on the level entered by the user. Correct the errors in the code.
» level; switch (level) { case 1: case 2: cout" style="" class="fr-fic fr-dib">
Transcribed Image Text:
Level 1 or 2 Message Bronze 3 Silver 4 or 5 Gold Other Invalid ID int level = 0; %3D cout « "Level (1 through 5): "; cin >» level; switch (level) { case 1: case 2: cout <« "Bronze"; case 3: break; cout <« "Silver"; case 4: cout « "Gold"; case 5: break; default: cout <« "Invalid ID"; //end switch Figure 6-39
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 90% (11 reviews)
int level 0 cout Level 1 through 5 cin level ...View the full answer
Answered By
Muhammad Ghyas Asif
It is my obligation to present efficient services to my clients by providing a work of quality, unique, competent and relevant. I hope you have confidence in me and assign me the order and i promise to follow all the instructions and keep time.
4.60+
109+ Reviews
203+ Question Solved
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Question Posted:
Students also viewed these Computer science questions
-
Use the code shown in Figure 6-34 to answer What will the code in Figure 6-34 display when the id variable contains the number 2? a. Janet b. Jerry c. Mark d. Sue switch (id) { case 8: cout < <...
-
Use the code shown in Figure 6-34 to answer What will the code in Figure 6-34 display when the id variable contains the number 4? a. Janet b. Jerry c. Mark d. Sue switch (id) { case 8: cout < <...
-
Use the code shown in Figure 6-34 to answer What will the code in Figure 6-34 display when the id variable contains the number 9? a. Janet b. Jerry c. Mark d. Sue switch (id) { case 8: cout < <...
-
Discuss the salient features of the international monetary system.
-
Let a1, a2, a3,..., an,... be an arithmetic sequence. In Problems 9-14, find the indicated quantities 10. a1 = - 2; d = -3 ; a2 = ?; a3 = ? 12. a1 = 8; d = - 10;a15 = ?;S23 = ? 14. a1 = 203; a30 =...
-
Respond to the following questions for your Pho Restaurant to design an e-mail marketing message : What message would you communicate to spur the recipient to take the desired action? Respond to the...
-
Explain the difference between express, implied, and corporate authority.
-
1. Cash inflows from operating activities come from a. Payment for raw materials. b. Collection of sales revenues. c. Gains on the sale of operating equipment. d. Issuing capital stock. e. Issuing...
-
= 2. (a): XYZ Inc. just paid out a dividend (Do) of $4.50. The firm anticipates that its annual dividends will grow at g 15% a year over the next 5 years. From t=5 onwards, the management expects...
-
South African Imports Company has assembled the (a) balance sheet and (b) income statement and change in retained earnings for 20X1 shown in Exhibit 16-23. On December 30, 20X1, South African Imports...
-
A program uses a char variable named department and two double variables named salary and raise. The department variable contains one of the following letters (entered in either uppercase or...
-
In this exercise, you will create a program that displays the number of daily calories needed to maintain your current weight. The number of calories is based on your gender, activity level, and...
-
Describe the summation and activation functions in MLP-type ANN architecture.
-
Delta Corporation, an S corporation, has $30,000 of taxable income before charitable contributions. The corporation has $5,000 in charitable contributions for the year. What is Delta's charitable...
-
On January 1, 2017, Rodney Rapp paid \(\$ 110,000\) for taxable bonds with a face value of \(\$ 100,000\) which mature on January 1 , 2027. He sold them on December 31, 2018 for \(\$ 104,000\). What...
-
Linda Sue Carr worked for a large food brokerage firm. In January of this year she was terminated. After a court battle Linda Sue was reinstated in her job and received from the firm in November...
-
Leonard and Linda Lindsay sold for \(\$ 350,000\) in October 2018 their residence that they had purchased in 2008 for \(\$ 100,000\). They made major capital improvements during their 10 -year...
-
Room rates in rural Bland, Virginia, are $34 per night. Rates in suburban Plainville, Connecticut, are $77 per night. Comparable accommodations cost $89 per night in rural West yellowstone and $96...
-
Gus (age 84) and Belle (age 18) are married in early 2016. Late in 2016, Belle confronts Gus about his failure to transfer to her the considerable amount of property he previously promised. Gus...
-
Sportique Boutique reported the following financial data for 2012 and 2011. Instructions(a) Calculate the current ratio for Sportique Boutique for 2012 and 2011.(b) Suppose that at the end of 2012,...
-
Write an application that stores at least five different college courses (such as CIS101), the time it first meets in the week (such as Mon 9 am), and the instructor (such as Johnson) in a...
-
In each case, determine the problem and fix the program. After you correct the errors, save each file using the same filename preceded with Fix. For example, DebugEight1.java will become...
-
Using a bubble sort involves comparing each array element with ____________. a. The corresponding element in a parallel array b. The adjacent element c. The arithmetic average d. The lowest element...
-
1-2. Draw graphs of the following functions using transformations: 1. y = 2x-1 x-2' 2. y log2x+1|- 3.
-
Assume a simultaneous open market purchase of 100 million from the Bank of England and a repayment of a discount loan of 5 million from Bank A to the Bank of England. Show the overall change in their...
-
Let 1 f(z) = (2-1)(x-2) Find the Laurent expansion of f about z = 0 in the region {ze C: 1
Study smarter with the SolutionInn App