SOURCE CODE
#include “iostream.h”
#include “conio.h”
#include
#define PI 3.141
class shape
{
public:
void volume(int);
void volume(int,float);
void volume(int,float,double);
};
void shape::volume(int r)
{
int vol=pow(r,3);
cout << "Volume Of Cube Is: " << vol="PI*r*h;" vol="l*b*h;">> r;
s.volume(r);
cout << "Enter The Value Of r,h: "; cin >> r >> h;
s.volume(r,h);
cout << "Enter The Value Of l,b,h: "; cin >> l >> b >> h;
s.volume(l,b,h);
getch();
}
OUTPUT
Enter The Value Of r: 3
Volume Of Cube Is: 27
Enter The Value Of r,h: 2
9.5
Volume Of Cylinder Is: 59.679001
Enter The Value Of l,b,h: 2
7.9
23.9
Area Of Rectangle Is: 377.619999