I need to create a program that determines how much it costs topaint a room. Its
ID: 3613547 • Letter: I
Question
I need to create a program that determines how much it costs topaint a room. Its given that for every 115 square ft of wall space,one gallon of paint two hours of labor are required. The companycharges 34.00 per hour for labor. The user needs to be able toenter the number of rooms that need painting and the price pergallon. the user also need to enter the square ft of wall space foreach room and validate the footage is a positive value greater than100 square feet.I must use these six functions:
Int numRooms();
int numGals (float area);
void paintPrice( float &area);
float wallArea();
float laborHrs(float);
void displayCost(int gallons, float paintPrice, float laborHrs)
the output of program:
the number of gallons of paint required.
the hours of labor required
the total cost of paint
total cost of labor
total cost of job
thank you, I am having a lot of trouble creating this program andcould use a lot of help.
Explanation / Answer
please rate - thanks #include #include using namespace std; int numRooms(); int numGals(float); float paintPrice(); float wallArea(int); float laborHrs(float); void displayCost(int,float,float ); int main() {int rooms,i,gals; float ppg,wall,hrs; rooms=numRooms(); ppg=paintPrice(); wall=wallArea(rooms); gals=numGals(wall); hrs=laborHrs(wall); displayCost(gals,ppg,hrs); system("pause"); return 0; } void displayCost (int gal, float price, float hrs) { float total,labor,paint; paint=price*gal; labor=hrs*34; total=paint+labor; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.