Question: program has fewer than 1 0 lines not counting the class definition, main method, or braces. Write a program that asks the user to enter

program has fewer than 10 lines not counting the class definition, main method, or braces.
Write a program that asks the user to enter a dollar amount representing the price they are willing to pay for the car of their dreams. If that amount is greater than or equal to $20k, they will get a discount of 10%, if it's greater than $50k, they will get a discount of 15% and if it's greater than $100k, the discount will be 30%. Display the discounted amount and congratulate the user on their purchase. A dialog will resemble:
How much are you willing to pay for the car of your dreams, in dollars?120000
Wow, with your discount of 30% applied, you only owe $84,000.00. Congrats!

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!