//Program to demonstrate function overloading to evaluate volume of a box

| |


#include<iostream.h>
#include<conio.h>
 void volume(int,int,int);
 void volume(int);
 void main()
 {  clrscr();
 int s,l,b,h;
 cout<<"Enter the side of a cube=";
 cin>>s;
 cout<<endl;
 cout<<"Enter the dimensions of a cuboid l,b,h=";
 cin>>l>>b>>h;
 cout<<endl;
 volume(s);
 volume(l,b,h);
 getch();
 }
 void volume(int a)
 {
 cout<<"Volume of cube is"<<a*a*a<<endl;
 cout<<endl;
 }
 void volume(int x,int y,int z)
 {    cout<<"The volume of cuboid is="<<x*y*z;
 }
<