Friday, August 2, 2013

Program to find out the volume of cone


#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float r,h,v;
cout<<"Enter the base radius in cm: ";
cin>>r;
cout<<"Enter the height in cm: ";
cin>>h;
v=(1/3)*3.14*r*r*h;
cout<<"Volume of cone is : "<<v<<" "<<"cc";
getch();
}

Output of this program will be :

Enter the base radius in cm :
25
Enter the height in cm :
14.43
Volume of cone is : 9444.4 cc

No comments:

Post a Comment