You have started working at a water plant and have been asked to develop a program which, can calculate the total water consumption bill. Your C++ program will input the number of gallons from the user and will calculate the total bill according to the following conditions: 1. The first 100 gallons for $0.45/gallon 2. The next 250 gallons for $0.85/gallon 3. The next 250 gallons for $1.45/gallon For additional gallons above 600 $2.60/gallon An additional service charge of 14% is also added to the bill. Your answer should be correct to 2 decimal places.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter2: Using Data
Section: Chapter Questions
Problem 4E: In this chapter, you learned that although a double and a decimal both hold floating-point numbers,...
icon
Related questions
Question

You have started working at a water plant and have been asked to develop a program which, can calculate the total water consumption bill. Your C++ program will input the number of gallons from
the user and will calculate the total bill according to the following conditions:
1. The first 100 gallons for $0.45/gallon
2. The next 250 gallons for $0.85/gallon
3. The next 250 gallons for $1.45/gallon
For additional gallons above 600 $2.60/gallon
An additional service charge of 14% is also added to the bill.
Your answer should be correct to 2 decimal places.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr