Calcualdora basica
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim num1 As Integer
Dim num2 As Integer
Dim total As Integer
num1 = TextBox1.Text
num2 = TextBox2.Text
If (rdsuma.Checked = True) Then
total = num1 + num2
TextBox3.Text = total
Else
If (rdresta.Checked = True) Then
total = num1 - num2
TextBox3.Text = total
Else
If (rdmultiplicacion.Checked = True) Then
total = num1 * num2
TextBox3.Text = total
Else
MessageBox.Show("no hay operacion")
End If
End If
End If
End Sub
programa hecho en visual studio
lenguaje: .net
Comentarios
Publicar un comentario