You are on page 1of 1

#include<iostream.

h>
#include<conio.h>
#define pi 3.14
class geo
{
public:
int volume(int l,int b,int h=3)
{
cout<<"\n\n\t\tVOLUME OF THREE GEOMETRIC FIUCTIO\n\n";
cout<<"\nEnter the values of l,b,h\n";
cin>>l>>b;
return(l*b*h);
}
int volume(float r,float h)
{
cout<<"\nEnter the valuesof r,h\n";
cin>>r>>h;
return(pi*r*r*h);
}
int volume(int a)
{
cout<<"\nEnter the value a\n";
cin>>a;
return(a*a*a);
}
};
void main()
{
clrscr();
int l,b,h,a;
float r,k;
geo g1;
cout<<"\nVolume of Cuboid is:"<<g1.volume(l,b);
cout<<"\nVolume of Cylinder is:"<<g1.volume(r,k);
cout<<"\nVolume of Cube is:"<<g1.volume(a);
getch();
}

You might also like