Calculadora Interfaz de La Calculadora
Calculadora Interfaz de La Calculadora
Calculadora Interfaz de La Calculadora
Interfaz de la calculadora
Programación de la calculadora
End Sub
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
TextBox1.Text = TextBox1.Text & 2
End Sub
End If
resp = 0
n2 = Val(TextBox1.Text)
If (opera = 4) Then
resp = n1 + n2
TextBox1.Text = resp
End If
resp = 0
n2 = Val(TextBox1.Text)
If (opera = 3) Then
resp = n1 - n2
TextBox1.Text = resp
End If
resp = 0
n2 = Val(TextBox1.Text)
If (opera = 2) Then
If (n2 <> 0) Then
resp = n1 / n2
TextBox1.Text = resp
Else
MsgBox("NO existe divicion en 0", MsgBoxStyle.OkOnly,
("error"))
TextBox1.ResetText()
End If
End If
If (opera = 6) Then
resp = n1 ^ n2
TextBox1.Text = resp
End If
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
Private Sub Button24_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button24.Click
n1 = Val(TextBox1.Text)
TextBox1.Text = 0 - n1
End Sub
End Sub
End Sub
End Sub
End If
End Sub
End Class