using namespace std;
class Bulk
{
public:
Bulk(double l=1,double w=1,double h=1)
{
length=l;
width=w;
height=h;
}
void get_value();
void output();
private:
double length;
double width;
double height;
};
void Bulk::get_value()
{
double l,w,h;
cin>>l>>w>>h;
length=l;
width=w;
height=h;
}
void Bulk::output()
{
cout<<"長方柱體積"<<length*width*height<<"長方柱表面積"<<2*length*width+2*length*height+2*width*height<<endl;
}
int main()
{
int i;
Bulk b[5]={Bulk(2.3,4.5,6.7),Bulk(1.5,3.4),Bulk(10.5)};
b[4].get_value();
for(i=0;i<5;i++)
b[i].output();
}