1. (TCO 2,4, 5, and 8) Write a program to input a purchase amount and calculate the sales tax and total due. The sales tax depends on the county identifying code. Counties with a number less than 15 have a 5% sales tax. The 16–30 codes have a sales tax of 6%. Codes above 30 have a sales tax of 7%. The purchase amount and county code are entered by the user. Use a loop to validate that the county code is between 8 and 40. Display the amount of the sales tax and the total.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |