Showing posts with label volume of cylinder. Show all posts
Showing posts with label volume of cylinder. Show all posts

Thursday, September 25, 2008

Volume of a Cylinder - Sample Visual Basic Program



This program compute the volume of cylinder

Private Sub Command1_Click()
radius = " "
hght = " "
volume = " "
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub OK_Click()
r = Val(radius.Text)
h = Val(hght.Text)
pi = 22 / 7
v = pi * (r ^ 2) * h
volume.Text = Str$(v)
End Sub

Private Sub radius_Change()

End Sub