subject

Write a program that will calculate and print out bills for 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 gallon million gallons; $2000.00 of usage is more than 4 million gallons but does not exceed 10 million gallons; and $3000.00 if usage exceeds 10 million gallons Your program should prompt the user to enter an account number (type int), the code (type char), and the gallons of water used (type float). Your program should echo the input data and print the amount due from the user.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
Our primary purpouse as electricians is to do wich of the following core concepts? a: install electrical components in a way they can be upgraded b: install electrical equiptment in a way that reduces heat c: install electrical systems in a safe manner d: only b and c
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
question
Computers and Technology, 23.06.2019 08:00
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
question
Computers and Technology, 23.06.2019 22:50
What is an rss reader used for? for creating a user account on a social new site
Answers: 2
You know the right answer?
Write a program that will calculate and print out bills for the city water company. The water rates...
Questions
Questions on the website: 13722362