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, 23.06.2019 02:00
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Write an essay on online collaboration, how to do it, the challenges, resolving the challenges, and consider whether the risks are greater than rewards. ( need )
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Drag the tiles to the correct boxes to complete the pairs. match the errors with their definitions. #name #value #ref when a formula produces output that is too lengthy to fit in the spreadsheet cell arrowright when you enter an invalid cell reference in a formula arrowright when you type text in cells that accept numeric data arrowright when you type in a cell reference that doesn’t exist arrowright reset next
Answers: 1
You know the right answer?
Write a program that will calculate and print out bills for the city water company. The water rates...
Questions
question
Mathematics, 31.08.2019 22:30
Questions on the website: 13722359