A software company sells a package that retails for $99. Quantity discounts are given according to the following table.
Write a C++ program that asks for the number of units purchased and computes the total cost of the purchase.
Please include the following :
Input Validation: Decide how the program should handle an input of less than 0.
Using Const to represent the RETAIL price per unit before the discount
Display formatted results, using fixed, showpoint, $ sign, and setpercision(2)
10-19 |
20% |
20-49 |
30% |
50-99 |
40% |
100 or more |
50% |
The program should use double data type, and the outputs should work to read the following images attached! Thanks so much for your help!!
Extracted text: A. C:\Windows\system32\cmd.exe ned How many units are being purchased? 10 The total cost of the purchase is $1592.00 Press any key to continue . .
Extracted text: A. C:\Windows\system32\cmd.exe ned How many units are being purchased? 10 The total cost of the purchase is $1592.00 Press any key to continue . .