Question: 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%
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
Get step-by-step solutions from verified subject matter experts
