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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!