#include<conio.h>
#include<iostream.h>
void main()
{
clrscr();
float r,l,h,tsa,csa,v;
cout<<"Enter radius of the Cone ";
cin>>r;
cout<<"Enter height of the Cone ";
cin>>h;
cout<<"Enter slant height of the cone ";
cin>>l;
float const pi=3.14;
v=(0.33)*pi*r*r*h;
csa=pi*r*l;
tsa=(pi*r*l)+(pi*r*r);
cout<<"Volume of Cone = "<<v<<"\n";
cout<<"CSA of Cone = "<<csa<<"\n";
cout<<"TSA of Cone = "<<tsa<<"\n";
getch();
}
#include<iostream.h>
void main()
{
clrscr();
float r,l,h,tsa,csa,v;
cout<<"Enter radius of the Cone ";
cin>>r;
cout<<"Enter height of the Cone ";
cin>>h;
cout<<"Enter slant height of the cone ";
cin>>l;
float const pi=3.14;
v=(0.33)*pi*r*r*h;
csa=pi*r*l;
tsa=(pi*r*l)+(pi*r*r);
cout<<"Volume of Cone = "<<v<<"\n";
cout<<"CSA of Cone = "<<csa<<"\n";
cout<<"TSA of Cone = "<<tsa<<"\n";
getch();
}
No comments:
Post a Comment