题目要求
需要求3个长方柱的体积,请编一个基于对象的程序。数据成员包含length(长)、width(宽)、height(高)。要求用成员函数实现以下功能:
①由键盘分别输入3个长方柱的长、宽、高;
②计算长方柱的体积;
③输出3个长方柱的体积;
代码段
include<iostream>
using namespace std;
class Cuboid
{
private:
float length;
float width;
float height;
public:
void set();
void volume();
void