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
nikklg [1K]
3 years ago
9

Assume that a gallon of paint covers about 350 square feet of wall space. Create an application with a main() method that prompt

s the user for the length, width, and height of a rectangular room. Pass these three values to a method that does the following: Calculates the wall area for a room Passes the calculated wall area to another method that calculates and returns the number of gallons of paint needed Displays the number of gallons needed Computes the price based on a paint price of $32 per gallon, assuming that the painter can buy any fraction of a gallon of paint at the same price as a whole gallon Returns the price to the main() method The main() method displays the final price. For example:
Computers and Technology
1 answer:
Makovka662 [10]3 years ago
5 0

Answer:

<em>C++</em>

#include <iostream>

#include <cmath>

using namespace std;

///////////////////////////////////////////////////////////////////////

int noOfGallons(int wallArea) {

   int gallon = 350;

   int gallon_price = 32.0;

   float total_price = 0.0;

   ///////////////////////////////////////////

   float noOfGallons = (float)wallArea/(float)gallon;

   printf("No of gallons needed %.2f", noOfGallons);

   cout<<endl;

   //////////////////////////////////////////

  total_price = noOfGallons*gallon_price;

   return round(total_price);

}

int wallArea(int length, int width, int height) {

   int wall_area = length*width;

   int total_price = noOfGallons(wall_area);

}

///////////////////////////////////////////////////////////////////////

int main() {

   int length, width, height;

   ///////////////////////////////////////////

   cout<<"Enter length: ";

   cin>>length;

   

   cout<<"Enter width: ";

   cin>>width;

   

   cout<<"Enter height: ";

   cin>>height;

   

   cout<<endl;

   ///////////////////////////////////////////

   int total_price = wallArea(length, width, height);

  cout<<"Total price: $"<<total_price;

   ///////////////////////////////////////////

   return 0;

}

You might be interested in
Access to sensitive or restricted information is controlled describes which of the key communications and information systems pr
Viktor [21]

Answer:

C: Security

Explanation:

Communications and information systems principles need to be, among other things, secure. They need to be able to protect sensitive information from those who intentionally not need to know. Some incident information like voice, networks, and data, are very sensitive and thus, should be secure to the right levels and should comply with privacy laws and data protection.

4 0
3 years ago
You enter the show ipv6 route command on an ospf device and the device displays a route. which conclusion can you draw about the
salantis [7]
<span>OSPFv3 is in use.......</span>
4 0
3 years ago
Isabela wants to add an image to her presentation. Which tab should she use?
Tresset [83]

Answer:

I believe its insert

Explanation:

because when u insert an image ur adding it

6 0
3 years ago
Computers and other technologies perform a great deal of work today, reducing the need for workers with special expertise. As a
Veronika [31]

Answer: deskilling

Explanation: Deskilling is the process by which skilled labor within an industry or economy is abolished by the introduction of technologies operated by semi skilled or unskilled labourers .

5 0
2 years ago
A salesman has been traveling to different businesses all day to give a sales presentation. Each time, he was starts up his lapt
Naddik [55]

Answer:

A. Corrupted or missing display driver

Explanation:

The most likely reason for this problem would be a corrupted or missing display driver. The display driver is in charge of grabbing the information from the graphic card and adjusting all the necessary settings so that all of the graphic card's power is able to be utilized. Missing or corrupt drivers can cause errors such as laggy display, wrong resolution/minimum resolution, missing display settings, etc. A graphic card failure on the other hand would show no image on the screen whatsoever when turning on the computer.

8 0
3 years ago
Other questions:
  • A disk rotates at a rate of 7200 revolutions per minute. Seek operations (i.e., moving the access head to a desired track) take
    6·1 answer
  • You have been asked to create an authentication security plan for your company. Which of the following components would you inco
    14·1 answer
  • Which best describes the relationship between maximum cost-per-click (max. cpc) bids and ad rank?
    12·1 answer
  • Which statement best describes the cut and paste option in a word processor?
    6·2 answers
  • The process known as "bitmapping" is defined as information in _____. PLEASE HELP FAST
    11·1 answer
  • Write an if/else statement that compares the value of the variables soldYesterday and soldToday, and based upon that comparison
    15·1 answer
  • Describe the different non-printing characters,​
    11·1 answer
  • Which command tells the for loop what to count by?
    9·2 answers
  • Do you think it's easier to be mean online than offline? why?
    14·1 answer
  • This function returns the length of a string:
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!