Solution:
#include<stdio.h>
#include<conio.h>
#include<iostream.h>
class Cuboid
{
float a,b,c;
public:
void getdata()
{
cout<<"\n Enter the Details : ";
cin>>a>>b>>c;
}
void setdata()
{
cout<<a<<b<<c;
}
inline void volume()
{
cout<<"\n The volume of cuboid. =\t"<<a*b*c;
}
inline void surface_ area()
{
cout<<"\n The surface area of cuboid =\t"<<2ab+2ac+2bc;
}
};
void main()
{
clrscr();
Cuboid c;
c.getdata();
c.volume();
c.surface_ area();
getch();
}
0 Comments