klik button hitung
Public Class Form1
Public Class Form1
Dim nilai1, nilai2 As Double
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
nilai1 = TextBox1.Text
nilai2 = TextBox2.Text
If RadioButton1.Checked = True Then
TextBox3.Text = nilai1 + nilai2
End If
If RadioButton2.Checked = True Then
TextBox3.Text = nilai1 - nilai2
End If
If RadioButton3.Checked = True Then
TextBox3.Text = nilai1 * nilai2
End If
If RadioButton4.Checked = True Then
TextBox3.Text = nilai1 / nilai2
End If
End Sub
End Class
Tidak ada komentar:
Posting Komentar