Codigo vb
Dim contenedor As Single
Dim funcion As String
btnsuma_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsuma.Click
IfTxtprincipal.Text = "" Then
MsgBox("No ha ingresado ningun dato", MsgBoxStyle.Critical, "error")
Else
contenedor = contenedor + Txtprincipal.Text
funcion = "suma"Txtprincipal.Text = ""
Private Sub Btnborrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnborrar.Click
contenedor = 0
funcion = ""Txtprincipal.Text = ""
Private Sub Btncalcular_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btncalcular.Click
If Txtprincipal.Text = "" ThenMsgBox("No ha ingresado ningun dato", MsgBoxStyle.Critical, "error")
ElseIf funcion = "suma" Then
Txtprincipal.Text = contenedor + Txtprincipal.Text
ElseIffuncion = "resta" Then
Txtprincipal.Text = contenedor - Txtprincipal.Text
ElseIf funcion = "multiplicar" Then
Txtprincipal.Text = contenedor * Txtprincipal.TextElseIf funcion = "dividir" And (Txtprincipal.Text = 0 Or Txtprincipal.Text = "") Then
MsgBox("no se puede dividir entre cero", MsgBoxStyle.Critical, "error")
ElseIf funcion ="dividir" And Txtprincipal.Text 0 Then
Txtprincipal.Text = contenedor / Txtprincipal.Text
End If
contenedor = 0
End Sub
End Class
If txtangle.Text = "90"Then
MessageBox.Show("angulo es un angulo recto")
resultado = "angulo"
ElseIf txtangle.Text "90" Then
MessageBox.Show("el angulo no es un angulo recto")resultado = "angulo"
ElseIf Txttempt.Text > "100" Then
MessageBox.Show("por encima del punto de ebullicion del agua")
ElseIf Txttempt.Text "100"...
Regístrate para leer el documento completo.