Wednesday 27 August 2014

Volume of Cylinder solution in cpp

Leave a Comment

//Volume of Cylinder  pi × radius2 × height
#include<iostream>
#include<math.h>
using namespace std;
static double pi=3.1415926535;
int main()
{
double radius1,height,radius3,Ans;
cout<<"Enter Radius 1 = ";
cin>>radius1;
cout<<"Enter Height = ";
cin>>height;
Ans=pi*pow(radius1,2)*height;
cout<<"Volume of Cylinder = "<<Ans<<endl;
system("pause");
}
If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: