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
lakkis [162]
3 years ago
6

C++ CODE

Computers and Technology
1 answer:
cestrela7 [59]3 years ago
7 0

Answer:

#include <iostream>

#include <cmath>

#include <iomanip>

using namespace std;

int main()

{

   const double PI = 3.14159;

   double height;

   double radius;

   

   cout << "Enter the height of the cylinder: ";

   cin >> height;

   cout << "Enter the radius of the base of the cylinder: ";

   cin >> radius;

   cout << endl;

   cout << "Volume of the cylinder = " << setprecision(4) << PI * pow(radius, 2.0) * height << endl;

   cout << "Surface area: " << setprecision(4) << 2 * PI * radius * height + 2 * PI * pow(radius, 2.0) << endl;

   cout << endl;

   return 0;

}

Explanation:

Code is rearranged so that;

- Variables are defined,

- <em>height</em> and <em>radius</em> of the cylinder is asked from the user,

- The <u>volume</u> and <u>surface area</u> of the cylinder are calculated and printed. (<u>setprecision(4)</u> is used to print two decimal values)

You might be interested in
If you had to choose, would you consider yourself more of an internet celebrant or a skeptic? On balance, do you think the inter
vitfil [10]

Answer:

i`m more a celebrant

Explanation:

3 0
3 years ago
I am programming and i want to find the amount of move functions i need to complete the full square. the square is 65 by 70 circ
Ahat [919]
Not to be rude, but this is elementary school. How would anyone know this?
8 0
4 years ago
What is a deny all catch all
a_sh-v [17]

Answer: The default catch-all rules at the end of  are: block in log quick all label "Default block all just to be sure." block out log quick all label .

Explanation:

7 0
3 years ago
It is used to show the program and files that are open.
Ilia_Sergeevich [38]
A
Indeed that’s what it is
5 0
3 years ago
The first personal computer operating system was named ___________.
Ksenya-84 [330]
<span>The first personal computer operating system was named DOS.
DOS stands for disk operating system. A system software that manages hardware and software resources is an operating system and </span>the personal computer is used by one person at a time. The first personal computer was the ENIAC (<span>Electronic Numerical Integrator and Computer</span>) which became operational in 1946.
8 0
3 years ago
Other questions:
  • What is a way to Procter your social security number and other sensitive information from identity theft
    9·1 answer
  • When tcp/ip was developed, the host table concept was expanded into a hierarchical name system for matching computer names and n
    5·1 answer
  • Chandra, a student working on a group project, is trying to decide how to have the whole group suggest revisions for an essay. S
    10·1 answer
  • Describe an application where a parallel circuit might work better than a series circuit.
    15·1 answer
  • When should students practice netiquette in an online course?
    9·1 answer
  • If you were the IT manager for a large manufacturing company,what issues might you have with the use of opensource software? Wha
    10·1 answer
  • What is the empty space inside the character 'O' called?
    12·1 answer
  • What do you do when you have computer problems? Check all that apply. PLEASE HELP
    9·2 answers
  • Why do attackers tend to target public or private Wi-fi networks?
    10·1 answer
  • The best presentations try to include as much text as possible on each slide true or false ​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!