Write a program that calculates and prints out bills of the city water company.
ID: 3651694 • Letter: W
Question
Write a program that calculates and prints out bills of the city water company. The water rates vary, depending on whether the bill is for home use, commercial use, or industrial use. A code of h means home use, a code of c means commercial use, and a code of i means industrial use. Any other code should be treated as an error. The water rates are computed as follows:*Code h: $5.00 plus $0.0005 per gallon used
*code c: $1000.00 for the first 4 million gallons used and $0.00025 for
each additional gallons.
*code i: $1000.00 if usage does not exceed 4 million gallons:
$2000.00. If usage is more than 4 million gallons but does not
exceed 10 million gallons; and $3000.00 if usage exceed 10 million gallons.
Your program should prompt the user to enter an account number (type
int,),the code (type char),and the gallons of a water used ( type float).
Your program should echo the input data and print the amount due
from the user.
Please write all the answer , i will rate 5 starir to the best answer! thanks!, plase write all the answer!
Explanation / Answer
#include #include #include using namespace std; float calculate(char Code,float Gallon){ switch(Code){ case 'c':case'C'://$1000.00 for the first 4 million gallons used and $0.00025 for each additional gallons. if(GallonRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.