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.
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.
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,...
Related questions
Question
You have started working at a water plant and have been asked to develop a
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images
Knowledge Booster
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.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr