0

Input the price of a product and the tax code (R or L).If the code is ‘R’ the tax rate is 8% and the rate is

12% for ‘L’. Calculate the total price and tax paid for the product. Continue processing until 0 is

encountered for price. Do error checks for all input data. Produce a summary table for all products.

Use the following input from your data file.

Sample input

100.25 R

350.5 L

450.3 L

500.5 L

-50 R

50.3 R

255.5 G

0