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
A set of programs that enable the hardware to process data is
Travka [436]
I think the answer youre looking for would be software. i hope this helped :3
6 0
3 years ago
Why is graphics important in multimedia application <br>​
erastova [34]
Graphics are important in multimedia application this is because humans are visually oriented etc.
5 0
3 years ago
Convert to different number system as mentioned.(17)10=(?)2​
Scorpion4ik [409]
“convert to a different number system as mentioned” there was no number system mentioned, but if you are just trying to find 17 * 10 = x * 2

all you need to do is find that 17 * 10 = 170 and 170/2 is 85 so

17 * 10 = 85 * 2
3 0
3 years ago
Looking at the code below, what happens when this onHit function runs?
inysia [295]
B dxjdbxhxbxbcjxxnxhcbfnc
7 0
3 years ago
Read 2 more answers
If you want to have certain icons available regardless of what tab you're using, you should add them to the
anzhelika [568]
If you want to have certain icons available regardless of what tab your using, you should add them to the [Quick Access Toolbar].
Quick access toolbar is a way in which you can easily access the tool you want to use often.
3 0
3 years ago
Other questions:
  • what is the goal of technology A. to understand how the natural world functions B. to study the natural world C. to improve the
    9·1 answer
  • A ________ allows a hacker to gain access to your computer and take almost complete control of it without your knowledge. zombie
    15·1 answer
  • The main workplace of a Windows computer is called the
    14·1 answer
  • The Appliance Warehouse case study is designed to practice systems analysis and design skills using a life-like scenario. Applia
    14·1 answer
  • How do computers read zeroes and ones?
    7·1 answer
  • John wants to share resources and move a large volume of data quickly over the Internet. John should use which of the following
    9·1 answer
  • Excerpt from "How Prepared Are Students for College Level Reading? Applying a Lexile-Based Approach."
    6·1 answer
  • Suppose we want an error correcting code that will allow all single-bit errors to be corrected for memory words of length 15. 1.
    5·1 answer
  • Use the drop-down menus to complete the steps to convert a macro to VBA.
    8·1 answer
  • By dividing the control plane from the data plane, SDN offers the flexibility to view the entire data plane infrastructure as a
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!