Public Class Form1
Dim a, b, c 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
a = Val(TextBox1.Text)
b = Val(TextBox2.Text)
c = (a ^ 2 + b ^ 2) ^ (1 / 2)
TextBox3.Text = c
End Sub
End Class
No comments:
Post a Comment
Note: only a member of this blog may post a comment.