So while researching C++ coding I ran across this example problem and it has me dumbfounded; I would like to understand how to code such an example. Please include source code and associated output.
A software company sells a package that retails for 199. Quantity discounts are given according to the following table.
Quantity Discount
10-19 20%
20-49 30%
50-99 40%
100 or more 50%
Code a program that asks for the number of units purchased and computes the total cost of the purchase.
Input Validation: Decide how the program should handle an input of less than 0