1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
blagie [28]
3 years ago
11

A painting company has determined that for every 115 square feet or wall space, one gallon of paint and eight hours of labor wil

l be required. The company charges $.18.00 per hour for labor . Write a program that allows the user to enter the number of rooms to be painted and the price of the paint per gallon. It should also ask for the square feet of wall space in each room. The program should have methods that return the following:
* The number of gallons of paint required
* The hours of labor required
*The cost of the paint
*The labor charges
*The Total cost of the paint job
Computers and Technology
1 answer:
Kay [80]3 years ago
7 0

The program to calculate the total paint cost and other values is given below.

#include <iostream>

using namespace std;

int main() {  

 int rooms, laborChrg = 18;

 float paintChrg;

 float feetPerRoom[rooms];  

 float paintReq, laborHrs, paintCost, laborCost, totalCost, totalsqft=0;  

 cout<<"Enter the number of rooms to be painted "<<endl;

 cin>>rooms;  

 for(int i=0; i <= rooms; i++)

 {

 cout<<"Enter the square feet in room "<<endl;

 cin>>feetPerRoom[i];  

 // shortcut operator which is equivalent to totalsqft = totalsqft +     feetPerRoom[i];

 totalsqft += feetPerRoom[i];

 }  

 cout<<"Enter the cost of the paint per gallon "<<endl;

 cin>>paintChrg;  

 laborHrs = (totalsqft/115)*8;

 laborCost = laborHrs * laborChrg;  

 paintReq = totalsqft/115;

 paintCost = paintReq * paintChrg;  

 totalCost = laborCost + paintCost;  

 cout<<"The number of gallons of paint required "<<paintReq<<endl;

 cout<<"The hours of labor required "<<laborHrs<<endl;

 cout<<"The cost of the paint is "<<paintCost<<endl;

 cout<<"The labor charges are "<<laborHrs<<endl;

 cout<<"The Total cost of the paint job is "<<totalCost<<endl;  

 return 0;

}

Explanation:

The header files for input and output are imported.

#include <iostream>

using namespace std;

All the variables are taken as float except labour charge per hour and number of rooms.

The user is asked to input the number of rooms to be painted. An array holds the square feet in each room to be painted.

cout<<"Enter the number of rooms to be painted "<<endl;

cin>>rooms;  

for(int i=0; i <= rooms; i++)

{

cout<<"Enter the square feet in room "<<endl;

cin>>feetPerRoom[i];  

totalsqft += feetPerRoom[i];

}  

The above code asks for square feet in each room and calculates the total square feet to be painted simultaneously.

All the data to be displayed is calculated based on the values of labor charge per hour and gallons of paint needed, given in the question.

laborHrs = (totalsqft/115)*8;

laborCost = laborHrs * laborChrg;

paintReq = totalsqft/115;

paintCost = paintReq * paintChrg;

totalCost = laborCost + paintCost;

All the calculated values are displayed in the mentioned order.

You might be interested in
HELP 99PTS If Answered
Alborosie

You will have to do this as we are not you and we do not know local business/websites. Sorry we could not help.

3 0
3 years ago
Read 2 more answers
How did The Gates by Christo and Jeanne-Claude affect the site?
Nadusha1986 [10]

Answer:

C. The experience of the park with The Gates was so different that some people saw the park in a new way.

Explanation:

The couple, Christo Javacheff and Jeanne-Claude Denat based in New York were two top contemporary artists who formed collaborative arts.

On the 3rd of January, 2005 they both made an art work known as The Gates, in Central Park.

The experience of the park with "The Gates" was so different that some people saw the park in a new way.

8 0
3 years ago
Read 2 more answers
You have just read about a new security patch that has been made available for your Windows system, so you install the patch as
zhenek [66]

Answer:

A

Explanation:

The best action to take is to download and install the last good update; in that case, it will override the recent unstable update.

An update is not like a single program that can be add or remove from the control panel.

6 0
3 years ago
Describe how implementation of a raid level 2 system would be beneficial to a university payroll system
lisabon 2012 [21]

<span>The RAID level 2 could give high information exchange rates and would be straightforward contrasted with other Raid levels. Be that as it may, it has a high cost and would need a high rate move required with a specific end goal to legitimize this cost.</span>

4 0
3 years ago
22. A user receives an error message when logging into Salesforce. What is the first check performed by an administrator?
WARRIOR [948]

Answer:

The first check performed by an administrator that it  View the login history.

Explanation:

When user logging into Salesforce it receives an error message into the  screen it view the logging detail which help us take to troubleshoot the problem. The logging history keeps track information like  who is access the system last time ,date etc .login history  also display up to 20,000 records of user logins for the last six months.

4 0
3 years ago
Other questions:
  • What is the input output ratio if its 12/23
    7·1 answer
  • Which of the following are incorrect safety precautions for equipment operators? A. Drive equipment or vehicles on grades or roa
    7·2 answers
  • What best describes the advantage of using the model of a food web?
    12·2 answers
  • Company policies require that all network infrastructure devices send system level information to a centralized server. Which of
    6·1 answer
  • The number of square units required to cover a surface.
    13·1 answer
  • The _____ is a blinking vertical line that indicates where the next typed character will appear. scroll box sheet tab insertion
    7·1 answer
  • Multiple client switches and routers have been set up at a small military base. The network team decided to implement Terminal A
    15·1 answer
  • The staff of the ___________________ will need to enter, maintain, and retrieve data from electronic health records within a hos
    9·1 answer
  • Please find one organization that has recently adopted virtualization and summarize their reasons for taking this approach. What
    12·1 answer
  • Whenever you press a key, click the mouse or start an application, you're sending instructions tow
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!