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
When in global configuration mode, which steps are necessary to edit an ip address on an Ethernet interface?
katrin2010 [14]

Answer:

I. You should enter interface configuration mode.

II. Configure the IP address and subnet mask.

Explanation:

A node refers to the physical device that make up a network and are capable of sending, receiving, creating and storing data in communication.

Some examples of network nodes are modem, hubs, computer, switches, phone and printers.

In Computer networking, network devices such as routers and switches are usually configured (programmed) through the use of specific network commands commonly referred to as configs e.g show int description, config terminal (config t), show IP address, etc.

In Cisco devices, there are five (5) main types of command modes;

1. Sub-interface configuration mode.

2. Interface configuration mode.

3. Line configuration mode.

4. Router configuration method.

5. Global configuration mode.

Global configuration mode is a configuration mode that avail network engineers and end users with the ability to modify or edit the running (global) system configuration of a networking device. Thus, any change effected at the global configuration mode will affect the network device as a whole.

In global configuration mode, the steps which are necessary to edit an ip address on an Ethernet interface include;

I. You should enter interface configuration mode using the "configure terminal" command.

II. Configure the IP address and subnet mask.

See an example below;

"Router(config-if)# IP address 192.168.1.2 255.255.255.0"

4 0
2 years ago
Using the functions from problems 1 and 2, write a MATLAB script to compare the laminar results from to the turbulent results. C
suter [353]

To start combining, select the Merge Mode option on the Comparison tab. Next, click the button next to the line you wish to merge in order to replace content from the right pane with content from the left pane.

<h3>How is boundary layer thickness calculated?</h3>
  • Where x is a position parallel to the wall, y is a coordinate normal to the wall, v is a (small) viscosity, u = (u, v) is the velocity, is the vorticity, and so on. The boundary conditions are as follows: u(x,y = +,t) = U, and u(x,y = 0,t) = 0.
  • To gauge the overall pressure, a vertically sliding Pitot tube is employed. So that the growth of the boundary layer in the flow direction can be seen, the total pressures can be recorded at various distances from the plate surface. Static pressure is gauged at a different measurement location.
  • To start combining, select the Merge Mode option on the Comparison tab. Next, click the button next to the line you wish to merge in order to replace content from the right pane with content from the left pane. Alternatively, you can pick a discrepancy and choose Replace Content from the Comparison tab.        

To learn more about Boundary conditions refer to:

brainly.com/question/23802083

#SPJ4

6 0
1 year ago
2. Because technology is always changing, there are new applications being developed constantly. (1 point)
Zepler [3.9K]
True because we need new tech
4 0
3 years ago
Read 2 more answers
A data flow cannot go directly back to the same process it leaves. There must be at least ________ other process(es) that handle
Flauer [41]

Answer:

Answer is A. One.

Refer below.

Explanation:

A data flow cannot go directly back to the same process it leaves. There must be at least one other process that handle(s) the data flow, produce(s) some other data flow, and return(s) the original data flow to the beginning process.

3 0
3 years ago
A good website design combines which of the following elements? (select all that apply) powerful web server hardware components
Anarel [89]

Sounds like it'd be all of the above.


7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a converter program for temperatures. This program should prompt the user for a temperature in Celsius. It should then con
    10·1 answer
  • Write a program that responds to a positive integer passed on the command line with the number of bits needed to express that nu
    10·1 answer
  • How does voting help in a social news site?
    10·1 answer
  • Does -8 = -21?<br>[this is NOT a trick question]<br>Yes....?<br>No!​
    12·2 answers
  • How do I keep my computer and data safe and secure while using the Internet?
    14·2 answers
  • The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c c
    6·1 answer
  • Davingould1115...................answer 3​
    11·1 answer
  • ⚠VERY IMPORTANT MESSAGE⚠
    7·2 answers
  • Write a function, called valFrequency, that given a list of values as a parameter, counts the frequencies for each value in the
    14·1 answer
  • How to fix a blue screen
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!