Public Class Form1
Dim r, csa, tsa, 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 System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Const PI As Single = 3.142
r = TextBox1.Text
csa = 2 * PI * r * r
tsa = 3 * PI * r * r
vol = (2 * PI * r * r * r) / 3
TextBox2.Text = csa
TextBox3.Text = tsa
TextBox4.Text = vol
End Sub
End Class
No comments:
Post a Comment
Note: only a member of this blog may post a comment.