Public Class Form1
Dim r, ar, per As Single
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
ar = PI * r * r
per = 2 * PI * r
TextBox2.Text = ar
TextBox3.Text = per
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Dim r, ar, per As Single
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
ar = PI * r * r
per = 2 * PI * r
TextBox2.Text = ar
TextBox3.Text = per
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
No comments:
Post a Comment
Note: only a member of this blog may post a comment.