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
Assume you previously entered these lines of code.
antiseptic1488 [7]

Answer:

result = ab + bc and result = a * b - b

Explanation:

That is what the test told me

8 0
2 years ago
Read 2 more answers
Do u have all the subjects​
Gnom [1K]

Answer:

yes I do have alllll the subjects

6 0
2 years ago
Read 2 more answers
What is the difference between = and == in terms of java..?
sukhopar [10]

= is for assignment, == is for comparison.

So x=2 means: assign the value 2 to the variable x.

and

x==2 means: is variable x equal to 2, yes or no?

3 0
2 years ago
Read 2 more answers
How are engineers are related to technology
vichka [17]
Engineering is the application of knowledge and technology is the body of knowledge:)
4 0
3 years ago
What is the term used to describe a computer system that can store literary documents, link them according to logical relationsh
zvonat [6]

Answer:

hypertext

Explanation:

Hypertext is used to describe a computer system that could store literary documents, link them

according to logical relationships, and allow readers to comment and annotate what they read.

Hypertext can also be said to be a system in which text on one page is used to link to text on other pages. They are simply text with links to other text.

Examples of hypertext footnotes, indexes, magazines, newspapers, etc.

A hypertext fiction can be described as an electronic literature with use of hypertext links.

3 0
2 years ago
Other questions:
  • Identify the correct software or hardware applications in the passage below
    10·1 answer
  • A ____ is text and graphics that print at the bottom of every page.
    12·1 answer
  • Urgent ..algorithm and flowchart to check weather a number is odd or even ???​
    8·2 answers
  • What is the correct order of headers, from left to right, in a completed frame?
    8·1 answer
  • What type of memory or storage device is prone to losing data if the power goes out?
    5·1 answer
  • To connect a peripheral device to a computer to exchange data, find the appropriate ________ for the device.
    7·1 answer
  • What is a simulation?
    5·2 answers
  • If Anyone can help me out that'll be great
    11·1 answer
  • 3. Which property provided the labels in the list below?
    9·1 answer
  • How is scale depicted on a flat video screen?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!