#include <iostream>
using namespace std;
struct Box
{
public:
Box(int len=10,int w=10,int h=10):length(len),width(w),height(h){}
int volume();
private:
int length;
int width;
int height;
};
int Box::volume()
{
return length*width*height;
}
int main()
{
Box a[2]={Box(),Box(20,20,20)};
cout<<"volime:"<<a[0].volume()<<endl;
cout<<"volime:"<<a[1].volume()<<endl;
return 0;
}
using namespace std;
struct Box
{
public:
Box(int len=10,int w=10,int h=10):length(len),width(w),height(h){}
int volume();
private:
int length;
int width;
int height;
};
int Box::volume()
{
return length*width*height;
}
int main()
{
Box a[2]={Box(),Box(20,20,20)};
cout<<"volime:"<<a[0].volume()<<endl;
cout<<"volime:"<<a[1].volume()<<endl;
return 0;
}