Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In C++ Please write a program which determines and prints out three results. 1. The number of exact gallons of paint to paint the walls
In C++
Please write a program which determines and prints out three results. 1. The number of exact gallons of paint to paint the walls and the ceiling (NOT THE FLOOR) of the room if 1 gallon is enough to paint 400 square feet. 2. How many gallons of paint you need to buy since you cannot buy part of a gallon. So if you need 3.2 gallons you must buy 4 gallons 3. The cost of the paint based on the following cost of paint: One gallon of paint cost 30 dollars but you get a 10% discount if you buy 3 or more gallons of paint and a 20% discount if you buy 5 or more gallons of paint. Please test your program with all three sets of the following data: Example Executions: Execution 1 Please enter the width of the room in feet: 8 Please enter the length of the room in feet: 8 Please enter the height of the room in feet: 10.5 You need exactly 1 gallon(s) of paint so you need to buy 1 gallon(s) which cost $30 dollars. Execution 2: Please enter the width of the room in feet: 14.2 Please enter the length of the room in feet: 17.4 Please enter the height of the room in feet: 10.0 You need exactly 2.1977 gallon(s) of paint so you need to buy 3 gallon(s) which cost $81 dollarsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started