Analice El Siguiente Codigo en Visual Basic y Cree La Pagina Correspondiente para Generar El Resultado Que Se Espera, Una Calculadora
Analice El Siguiente Codigo en Visual Basic y Cree La Pagina Correspondiente para Generar El Resultado Que Se Espera, Una Calculadora
Inherits System.Web.UI.Page
Dim P As String
End Sub
End Sub
End Sub
End Sub
Protected Sub n4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles n4.Click
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
Protected Sub coma_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles
coma.Click
P=1
If P = 1 Then
coma.Enabled = False
End If
End Sub
Operacion = "suma"
Dato = Val(Pantalla.Text)
Pantalla.Text = ""
coma.Enabled = True
End Sub
Dato1 = Val(Pantalla.Text)
coma.Enabled = True
Pantalla.Text = Result
Else
If Operacion = "resta" Then
Pantalla.Text = Result
Else
Pantalla.Text = Result
Else
Pantalla.Text = Result
End If
End If
End If
End If
End Sub
Operacion = "resta"
Dato = Val(Pantalla.Text)
Pantalla.Text = ""
coma.Enabled = True
End Sub
Protected Sub multiplicacion_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles multiplicacion.Click
Operacion = "multiplicacion"
Dato = Val(Pantalla.Text)
Pantalla.Text = ""
coma.Enabled = True
End Sub
Operacion = "division"
Dato = Val(Pantalla.Text)
Pantalla.Text = ""
coma.Enabled = True
End Sub
Pantalla.Text = ""
coma.Enabled = True
End Sub
Pantalla.Text = ""
coma.Enabled = True
End Sub
End Class