Question: undefined In this exercise, you will write a program to compute how many cans of paint are necessary to paint a wall. Begin the program

undefined In this exercise, you will write a program to compute howundefined

In this exercise, you will write a program to compute how many cans of paint are necessary to paint a wall. Begin the program by asking the user to input the height and width of the wall as follows: Enter wall height (feet): Crumber> Erster wall width (feet): Cnumber> Then, use the function CansOfPaint(double height, double width) to compute how many cans of paint are needed to paint this wail. The function returns the number cans of paints needed (integer) Assume that 1 gallon of paint can cover 300 square feet, and each can contains half a gallon of paint. Define these as constants within the function. Use the result returned by the function to print this message to the user: Cans needed: can(s) Example: Eriter wall height (feet): 12.0 Enter wall width (feet): 15.3 Cans needed: 2 can(s) Hint: Use a math function to round up to the nearest gallon (cmath library). Any attempt to hardcode the results will result in 0 points for the exercise. The functions must be defined and called as required in the instructions

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!