Wednesday, 27 August 2014

Volume of Cone solution in cpp

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