Question: #include float paintGallons(float length,float width,float height){ float size1 = length * height; float size2 = width * height; float area = length * width; float

#include

float paintGallons(float length,float width,float height){

float size1 = length * height;

float size2 = width * height;

float area = length * width;

float total = (2 * size1) + (2 * size2) + area;

return total/400.0;

}

int main(){

printf("%.2f gallons ",paintGallons(10,12,8));

return 0;

}

Can someone explain what each line of this C code program is doing?

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!