Question: Create a program that will - Prompt the user to type the original price of an item - Input the value into a double variable

Create a program that will
- Prompt the user to type the original price of an item
- Input the value into a double variable called price
- If the original price is at most $100
Then the discount is 20%
(calculate the discounted value and store it in another
double variable called discounted_price)
otherwise
the discount is 40%
(discounted_price variable)
- Print the discounted price

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!