Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Latihan3
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim x, y, i, hasil As Double
- x = Val(TextBox1.Text)
- y = Val(TextBox2.Text)
- hasil = 1
- For i = 1 To y
- hasil = hasil * x
- Next
- TextBox3.Text = Str(hasil)
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Dim result As Integer = MsgBox("Apakah Anda Sudah Yakin Mau Keluar? ", MsgBoxStyle.Information + MsgBoxStyle.OkCancel, "Informasi")
- If result = DialogResult.OK Then
- Me.Close()
- Else
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement