Pete's Plumbing of Pompey sells to both retail and wholesale buyers. The retail buyer must pay New York State and Onondaga County sales tax (8%). However, the wholesale buyer does not pay sales tax and receives a volume discount on the amount purchased:
Amount < $100 |
Discount = 2% |
Amount ? $100 and < $500 |
Discount = 5% |
Amount ? $500 |
Discount = 10% |
Given a character code to indicate the type of customer ('R' or 'W') and an amount purchased, calculate how much the customer will owe. The output will be formatted with 2 decimal places.