Write a program to do the following ask the user which


Residential and business customers are paying different rates for water usage. Residential customers pay $0.004 per gallon for the first 8000 gallons. If the usage is more than 8000 gallons, the rate will be $0.007 per gallon after the first 8000 gallons. Business customers pay $0.005 per gallon for the first 10000 gallons. If the usage is more than 10000 gallons, the rate will be $0.009 per gallon after the first 10000 gallons. For example, if a business customer has used 12000 gallons, they need to pay $50 for the first 10000 gallons ($0.005 * 100000), plus $18 for the other 2000 gallons ($0.009 * 2000). Write a program to do the following. Ask the user which type the customer it is and how many gallons of water have been used. Calculate and display the bill.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a program to do the following ask the user which
Reference No:- TGS01464146

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)