A software company sells a package that retails for $109. Quantity discounts are given according to the following table. Quantity Discount 10 - 39 10% 40 - 65 18% 66 - 90 27% 91 - 120 35% 121 – 199 42% 200 or more 48% Write a program using the if/else if/else statement that asks for the number of units sold and computes the total cost of the purchase and the savings due to the discount applied. The program should also display the number of units purchased and the discount in percentage. The output should include the following text: Number of units purchased is: Discount applied is: Total savings due to discount is: The total cost of the purchase is: Do NOT use the switch statement, any logical operator or anything that looks like one in the program. You will not receive credit for the program if you do. See Program 4-9 on page 183 of your textbook for help. Don’t forget to include the developerInfo function and do not accept negative quantity values.
A software company sells a package that retails for $109. Quantity discounts are given
according to the following table.
Quantity Discount
10 - 39 10%
40 - 65 18%
66 - 90 27%
91 - 120 35%
121 – 199 42%
200 or more 48%
Write a program using the if/else if/else statement that asks for the number of units sold
and computes the total cost of the purchase and the savings due to the discount
applied. The program should also display the number of units purchased and the
discount in percentage. The output should include the following text:
Number of units purchased is:
Discount applied is:
Total savings due to discount is:
The total cost of the purchase is:
Do NOT use the switch statement, any logical operator or anything that looks like
one in the program. You will not receive credit for the program if you do. See
Program 4-9 on page 183 of your textbook for help.
Don’t forget to include the developerInfo function and do not accept negative quantity
values.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images