A software company sells a package that retails for $109. Quantity discounts are given according to the following table. 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.
A software company sells a package that retails for $109. Quantity discounts are given
according to the following table.
Write a
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.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images