Imports System
Public Class CalculateVolumeSphere
Public Shared Function sphereVolume(r As Double) As Double
Return 4.0 / 3.0 * Math.PI * Math.Pow(r, 3)
End Function
Public Shared Sub Main()
Dim radius As Integer = 5
Console.Write("Volume of sphere = " & sphereVolume(radius))
End Sub
End Class
' run:
'
' Volume of sphere = 523.598775598299
'