# How to find the volume of a cube in programming

#### zMiiGHTz

##### Distinguished
i need to adapt this program to find the volume of a cube

Dim Radius As Integer = 5
Dim Area As Double
Const Pi As Double = 3.14159265
MsgBox(Area)

#### PhilFrisbie

##### Distinguished
That is a trivial task for a homework assignment! Just remove the code you don't need for a cube, and add the code you do need.

#### hang-the-9

##### Titan
Moderator
volume of cube: even easier to find than the other code. If a circle has radius, a box has what in relation? Then put that to the 3rd power. I sure hope you are not going into engineering and we have to drive over bridges you designed.

#### Hawkeye22

##### Distinguished
Moderator
...and the formula is even eaiser. For a perfect cube,
volume = (length of any side)^3.

#### PhilFrisbie

##### Distinguished
^^ I assumed he at least knew that

Apps General Discussion 3
Apps General Discussion 6
Apps General Discussion 1
Apps General Discussion 1
Apps General Discussion 1
Apps General Discussion 3
Apps General Discussion 1
Apps General Discussion 5
Apps General Discussion 2
Apps General Discussion 5
Apps General Discussion 2
Apps General Discussion 7
Apps General Discussion 2
Apps General Discussion 24
Apps General Discussion 1
Apps General Discussion 4
Apps General Discussion 4
Apps General Discussion 3
Apps General Discussion 4
Apps General Discussion 6