#include <iostream>
using std::cout;
using std::endl;
class Test {
double length, width, height;
double volume;
public:
Test(double l, double w, double h);
void print();
};
Test::Test(double l, double w, double h)
{
length = l;
width = w;
height = h;
volume = length * width * height;
}
void Test::print()
{
cout << "volume: " << volume << endl;
}
int main()
{
Test o(3.13, 2.76, 6.21);
o.print();
return 0;
}
/*
run:
volume: 53.6469
*/