#include<iostream.h>
#include<conio.h>
int volume(int);
double volume(double,int);
long volume(long,int,int);
int main()
{
clrscr();
int x,s,h,b;
double y,r;
long z,l;
cout<<"\n\nEnter the value for s : ";
cin>>s;
x=volume(s);
cout<<"\n\n\Volume of cube : "<<x;
cout<<"\n\n\Enter the value for r and h : ";
cin>>r>>h;
y=volume(r,h);
cout<<"\n\nVolume of cylender : "<<y;
cout<<"\n\nEnter the value for l,b and h : ";
cin>>l>>b>>h;
z=volume(l,b,h);
cout<<"\n\nVolume of rectangle : "<<z;
getch();
return 0;
}
int volume(int s)
{
return (s*s*s);
}
double volume(double r,int h)
{
return (3.14*r*r*h);
}
long volume(long l,int b,int h)
{
return (l*b*h);
}

Post a Comment

Previous Post Next Post