Question: Upload your *DOCUMENTED* C program with a .c extension paintGallons (length, width, height) Write the function paintGallons (length, width, height) that takes three floats for

Upload your *DOCUMENTED* C program with a .c extension
paintGallons (length, width, height) Write the function paintGallons (length, width, height) that takes three floats for length, width, and height of the rectangular room, all in feet. Using this information and the nominal coverage for a given paint, compute the amount of paint needed to cover the four walls and ceiling, assuming no doors or windows. The function returns the whole number of gallons of paint needed. Assume one gallon of paint will cover 400 square feet. You need to round up the required gallon number. Sample Code Run Assume a room of length 10 feet, width 12 feet and height 8 feet. The area of the walls would be: 10 ft x 8ft = 80 sq. ft. (2 walls this size) 12 ft x 8 ft = 96 sq. ft. (2 walls this size) The area of the ceiling would be: 10 ft x 12 ft = 120 sq. ft. The total area would then be: 2 x 80 sq ft. + 2 x 96 sq.ft. + 120 sq. ft = 472 sq. ft. 472 sq. ft / 400 sq. ft per gallon = 1.18 gallons thus 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
