Public Class Form1
Dim rad, sa, vol As Single
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Const PI As Single = 3.142
rad = TextBox1.Text
sa = 4 * PI * rad * rad
vol = (4 * PI * rad * rad * rad) / 3
TextBox2.Text = sa
TextBox3.Text = vol
End Sub
End Class
No comments:
Post a Comment
Note: only a member of this blog may post a comment.