Public Class Form1
Dim l, b, h, vol, sa, diag As Single
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
l = TextBox1.Text
b = TextBox2.Text
h = TextBox3.Text
vol = l * b * h
sa = 2 * ((l * b) + (b * h) + (h * l))
diag = (l ^ 2 + b ^ 2 + h ^ 2) ^ (1 / 2)
TextBox4.Text = vol
TextBox5.Text = sa
TextBox6.Text = diag
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.