76 820
Assignments Done
Successfully Done
In June 2019

Answer to Question #14177 in C++ for Leigh

Question #14177
A painting company has determined that for every 115 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $20.00 per hour for the labor.
4. Display the following details in an organized form:
a. The required number of gallons of paint
b. The required hours of labor
c. The labor charges
d. The total cost of the painting job
Using structure and functions
Expert's answer
#include <iostream>
#include <conio.h>
using namespace std;
struct PaintingCompany {
double galonsOfPaint,labor, hours, total;

void print(){
cout<<"Galons of paint needed: " << test.galonsOfPaint << endl;
cout<<"Hours needed: "<< test.hours << endl;
cout<<"Labor needed: $"<< test.labor << endl;
cout<<"Total: $"<< test.total << endl;

int main ()
int wallLength;
cout<<"Enter the length of the wall: ";
cin >> wallLength;
test.hours = (wallLength*8)/115;
test.galonsOfPaint = test.hours/8.0;
test.labor = test.hours*20;
test.total = test.labor;
return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions