Public Class Formpangkat
Private Sub btnbatal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbatal.Click
txtX.Text = "0"
txtY.Text = "0"
txtXY.Text = "0"
txtX.Focus()
End Sub
Private Sub btnhitung_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhitung.Click
Dim a, b, hasil As Integer
a = txtX.Text
b = txtY.Text
hasil = 1
For i = 1 To b
hasil = hasil * a
Next i
txtXY.Text = hasil
End Sub
End Class
Komentar
Posting Komentar