Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

int x = 5, y = 6: switch (x) case 1: case 2: yX; break; case 3: case 4: case 5: y - y -

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
int x = 5, y = 6: switch (x) case 1: case 2: yX; break; case 3: case 4: case 5: y - y - x; default: X-y: } cout What is the output of the code above? Answers: 11 5 1 66 55 What is the output of the following code? char grade - 'B'; switch (grade) case 'A': cout O) 2Xy: Answers: b, 3 A shop sells goods that retail for $99. The discounts are given based on the quantity as shown in the table below: Quantity Discount 10-19 206 20-39 3046 40-90 406 91 or more 50% Write a program that promotes the user to enter the number of goods purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount. Sample input/output Enter the past the discuss The total out of the case after the discount: $ 2008 Procured hot: 1.85

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

Students also viewed these Databases questions