-
What is the output of the following program?
#include
using namespace std;
class BoxVolume
{
public :
double L;
double B;
double H;
};
int main( )
{
BoxVolume Box;
double vol;
Box.H = 3;
Box.L = 4;
Box.B = 2.15;
vol = Box.H * Box.L * Box.B;
cout << "Volume of Box : " << vol <return 0;
}
-
- 3
- 4
- 2.15
- 25.8
- None of these
Correct Option: D
In the above program, we are calculating the area of the cube by using the cube formula.