#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
long int h,r,a1,a2,v;
cout<<"Enter height of the Cylinder ";
cin>>h;
cout<<"Enter radius of the Cylinder ";
cin>>r;
float const pi=3.14;
v=pi*r*r*h;
a1=2*pi*r*h;
a2=(2*pi*r*r)+(2*pi*r*h);
cout<<"Volume of Cylinder = "<<v<<"\n";
cout<<"TSA of Cylinder = "<<a2<<"\n";
cout<<"CSA of Cylinder = "<<a1<<"\n";
getch();
}
#include<conio.h>
void main()
{
clrscr();
long int h,r,a1,a2,v;
cout<<"Enter height of the Cylinder ";
cin>>h;
cout<<"Enter radius of the Cylinder ";
cin>>r;
float const pi=3.14;
v=pi*r*r*h;
a1=2*pi*r*h;
a2=(2*pi*r*r)+(2*pi*r*h);
cout<<"Volume of Cylinder = "<<v<<"\n";
cout<<"TSA of Cylinder = "<<a2<<"\n";
cout<<"CSA of Cylinder = "<<a1<<"\n";
getch();
}
No comments:
Post a Comment