Answer to Question #226672 in C++ for Ulando

Question #226672

Write a program to compute the volume of a cylinder.your program reads the redius and length and computes using the formula

Area =radius *radius *pi

Volume =area =*length.


1
Expert's answer
2021-08-17T12:55:22-0400


#include <iostream>


using namespace std;


int main()
{
    double radius; 
    double length; 
    cout<<"\nEnter radius: ";
    cin>>radius;
    cout<<"\nEnter length: ";
    cin>>length;
    double pi=3.14285714286;
    double area =radius *radius *pi;
    double volume =area *length;
    cout<<"\nVolume of the cylinder= "<<volume<<"\n"; 


    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS