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.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter4: Control Structures I (selection)
Section: Chapter Questions
Problem 20PE: The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a...
icon
Related questions
Question

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.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning