Public Class Form1
Private Sub btnluas_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnluas.Click
Dim Jari1, Jari2, Hasil As Integer
Jari1 = Val(txtjari1.Text)
Jari2 = Val(txtjari2.Text)
Hasil = Val(3.14 * txtjari1.Text * txtjari2.Text)
txthasil.Text = Hasil
End Sub
Private Sub btnvolume_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnvolume.Click
Dim Jari1, Jari2, Tinggi, Hasil As Integer
Jari1 = Val(txtjari1.Text)
Jari2 = Val(txtjari2.Text)
Tinggi = Val(txttinggi.Text)
Hasil = Val(3.14 * txtjari1.Text * txtjari2.Text * txttinggi.Text)
txthasil.Text = Hasil
End Sub
End Class
Komentar
Posting Komentar