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
What would a world where we have 2^128 (340 undecillion) Internet connected devices look like? How could that much Internet usag
cluponka [151]

A world  have 2^128 (340 undecillion) of IPv addresses that helps to connect to the internet. IPv6 addresses can make it easier for working organizational teams connecting to the Internet, IP addresses that are created by IPv6 are 128 bits.

<h3>What is internet?</h3>

Internet is the system  uses the Internet protocol suite (TCP/IP)  and interconnected computer networks that communicate between two or more individuals.

Today, almost 20 IP addresses are taken by7 each home for each electronic device. The internet usage is so wide, that even a simple task  is not possible without it. Even a simple task can be done using internet.

Learn more about internet.

brainly.com/question/13308791

#SPJ1

5 0
2 years ago
Which of the following audio file formats is best
Amiraneli [1.4K]

Answer:

D. WMA

Explanation:

The following audio file formats that is the best suited for listening to music on a portable audio device is WMA.

8 0
3 years ago
Jeroo Bob has just awoken from a long night's sleep and is hungry for some winsum flowers. He walks out of
IgorLugansk [536]

Answer:

bro this is long try something easy

Explanation:

im lazy to read

7 0
3 years ago
If the catch-or-declare requirement for a checked exception is not satisfied ________. a. a stack trace will be displayed indica
irakobra [83]

Answer: I think the answer is B. the compiler will issue an error message indicating that the exception must be caught or declared.

Explanation:

7 0
3 years ago
Ali rolled a ball down a hill. This graph shows the kinetic and potential energy of the moving ball.
denis23 [38]
Ghhsususuhwbababahaha
8 0
2 years ago
Other questions:
  • A search engine is a way to
    15·2 answers
  • Open a command prompt on PC1. Issue the command to display the IPv6 settings. Based on the output, would you expect PC1 to be ab
    7·1 answer
  • After typing “application letter” in the Search window in the New dialog box, Nate clicks the Education category. Three letters
    9·1 answer
  • What does Josh Silverman name as the most important aspect of managing finances?
    10·2 answers
  • What are some of the academic benefits of a later start time that Jordan mentions​
    12·1 answer
  • Which type of DNS zone resolves host names to IP addresses?
    8·1 answer
  • What are the correct steps to find the system specifications such as the amount of RAM or system type?
    13·1 answer
  • I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRIST AND CORRECT
    10·2 answers
  • - Discuss the input-process-output model as it relates to program development.
    12·1 answer
  • Watch any film of the silent era. Choose a short film from any genre that is less than 30 minutes long. Write a review of your e
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!