Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ write a program that takes in input the price of an item followed by the desired discount option 1 for 10% 2 for 20%

C++ image text in transcribed
write a program that takes in input the price of an item followed by the desired discount option 1 for 10% 2 for 20% 3 for 30%) or 4 for custom discount values). If option 4 is chosen, it should be followed by desired discount value Enter these values in the input box The program will output the final price of the item. The final price is $4.50. Check the value for option (must be greater than 0 or less than or equal to 4). If it's not correct, the output should be Wrong option! Check for the correctness of the price (must be greater than 0). If it's not correct, the output message should contain the word Error If you choose option 4 but did not enter the correct discount value( if discount is less than zero or if discount is greater than 100), the out message should contain the word Wrong Use swtich statements to choose the options. Use the following syntax to print the final price with two digits after the comma (requires library iomanip): cout

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

More Books

Students also viewed these Databases questions

Question

What is a financial feasibility analysis?

Answered: 1 week ago