A software company sells a package that retails for \$99. Quantity discounts are given according to the following table:                                      [4]

QUANTITY          DISCOUNT

10 – 19                   20 %

20 – 49                  30%

50 – 99                 40%

100 or more           50%

1 Write a program that asks for the number of units sold and computes the total cost of the purchase. Make sure the number of units is greater than 0.

The program should use switch-case statement to compute the discounts & the total cost of the purchase

2. Write a program that uses a for statement to calculate the average of several integers input to the program in response to a prompt. Assume that the last value read is the sentinel value 99999. For example, 10 8 7 13 9 99999 indicates that the program should calculate the average of all the values preceding 99999.                                                                 [3]

3. Implement problem 2 again above using a while statement.        [3]