Question
For c++ Write a function named PaintHouse to calculate the cost to paint a house. The function will take an integer for the width, the
For c++ Write a function named PaintHouse to calculate the cost to paint a house. The function will take an integer for the width, the depth of the house, and the number of windows/doors in the house. The function returns a floating point value for the total cost of the work. Total cost of painting of house = cost of painting wall + cost of painting doors and windows The cost to paint the windows and doors is $6.75 per door/window The cost of painting the walls is calculated as the perimeter of house times the cost per feet. Perimeter of house = 2 * (width + depth) Painting cost for first 100 feet of the house perimeter is $8 per feet Painting cost for next 100 feet of the house perimeter is $10 per feet Painting cost for house perimeter above 200 feet is $15 per feet For any invalid parameter value, return -1
- Your function should be named PaintHouse
- Your function takes three input parameters: three integer numbers
- Your function has a return value: a floating point number
Step 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