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
My name is Ann [436]
3 years ago
10

This is C++

Computers and Technology
1 answer:
leonid [27]3 years ago
7 0

Answer:

#include <cmath>

#include<iostream>

using namespace std;

int main()

{

double height, width;

cout<<"Enter wall height (feet): ";

cin>>height;

cout<<"Enter wall width (feet):  ";

cin>>width;

//1

double area;

area = width * height;

cout<<"Wall area: "<<area<<" square feet"<<"\n";

//2

const double gallon = area/350.0;

cout<<"Paint needed: "<<gallon<<" gallons"<<"\n";

//3

cout << "Cans needed :" << round(gallon) << " can(s)";  

return 0;

}

Explanation:

This line declares the height and width as double

double height, width;

This line prompts user for height

cout<<"Enter wall height (feet): ";

This line gets user input for height

cin>>height;

This line prompts user for width

cout<<"Enter wall width (feet):  ";

This line gets user input for width

cin>>width;

//1  Question 1 begins here

This line declares area as double

double area;

The line calculates area

area = width * height;

The line prints the calculated area

cout<<"Wall area: "<<area<<" square feet"<<"\n";

//2  Question 2 begins here

This line declares and calculates gallon as a constant double variable

const double gallon = area/350.0;

This line prints the calculated gallon

cout<<"Paint needed: "<<gallon<<" gallons"<<"\n";

//3  Question 3 begins here

This line rounds gallon to nearest whole number and prints the result

cout << "Cans needed :" << round(gallon) << " can(s)";  

Download cpp
You might be interested in
A child with suspected sleep apnea was given an apnea monitoring device to use over the next month. The device was capable of re
Hoochie [10]

I guess the correct answer is 94774

In thе CPT® Indеx lοοk fοr Mοnitοring/Pеdiatric Apnеa and yοu arе dirеctеd tο cοdе rangе 94774-94777.  Cοdе sеlеctiοn is basеd οn thе cοmpοnеnts οf thе tеst pеrfοrmеd.  In this casе, cοdе 94774 dеscribеs thе data stοragе capability, including thе prοvidеr οr οthеr qualifiеd hеalth carе prοfеssiοnal intеrprеtatiοn and rеpοrt.  Thе cοdе is tο bе rеpοrtеd еach 30-day pеriοd.

6 0
3 years ago
A server can be added to Server Manager by which of the following methods?
solmaris [256]
C. Importing a text file.  Server manager is where you can remotely administer your servers. Answer a. isn't true because you don't need a web server running to be remotely managed. b. Isn't true because wscript is old technology and microsoft would most likely use powershell, and DHCP is used to hand out IP addresses.
3 0
3 years ago
Sally notices that she has the same set of 10 blocks in her code in multiple places. She decides to create a new block (procedur
SashulF [63]

Answer: it is C. 41

Explanation: i no it

6 0
3 years ago
Patricia's partner Alex has shared a spreadsheet he created. On the first row he has given the spreadsheet a title. The title ap
Alexxandr [17]

Answer:

Merge cells A1:E1 and centre the title text in the merged cell.

Explanation:

In order for the title of the shared spreadsheet document to appear centred in the first row above the other five columns, Patricia will be required to merge the first row A1 with the fifth row E1 and centre the title text in the merged cells. This increases the number of rows  and columns of the spreadsheet as the information in the other cells will be shifted down.

3 0
3 years ago
What command do we use to enter data from the keyboard?
SVEN [57.7K]
D I would think……… good luck
6 0
3 years ago
Other questions:
  • Janelle is organizing an outline for an investigative report about the benefits of taking a 30-minute walk each day. which of th
    11·2 answers
  • The binary search algorithm ________. will have a maximum number of comparisons equal to the number of elements in the array wil
    7·1 answer
  • A résumé can be delivered through _____.a.
    9·2 answers
  • Please check my answer! (Java)
    8·1 answer
  • How is the illusion of animation achieved using Sprites with multiple costumes?
    12·1 answer
  • Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop shou
    5·1 answer
  • You are a network consultant who has been asked to attend an initial meeting with the executive management team of ElectroMyCycl
    10·1 answer
  • 5. How many subnets are possible in a network with a /19 CIDR?
    5·1 answer
  • . Aisha’s supervisor asks her to create an aspect of a program that will hold data and make it easy to access. What does Aisha n
    5·1 answer
  • The following statements regarding centralized administration concepts are presented to you in an interview in which only one of
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!