'Declaracion de Variables: "Ingrese Valor 1 " "Ingrese Valor 2 " "Ingrese Valor 3 "

You might also like

You are on page 1of 1

'declaracion de variables

Dim variablea As Integer


Dim variableb As Integer
Dim variablec As Integer
Dim nmenor As Integer
Dim nmayor As Integer
'proceso
variablea = InputBox("ingrese valor 1 ")
variableb = InputBox("ingrese valor 2 ")
variablec = InputBox("ingrese valor 3 ")

If variablea < variableb And variablea < variablec Then


nmenor = variablea
ElseIf variableb < variablea And variableb < variablec Then
nmenor = variableb
ElseIf variablec < variablea And variablec < variableb Then
nmenor = variablec
End If
If variablea > variableb And variablea > variablec Then
nmayor = variablea
ElseIf variableb > variablea And variableb > variablec Then
nmayor = variableb
ElseIf variablec > variablea And variablec > variableb Then
nmayor = variablec
End If
If variablea = variableb Then
MsgBox("no se permite valores iguales")
End If
If variablea = variablec Then
MsgBox("no se permite valores iguales")
End If
If variableb = variablec Then
MsgBox("no se permite valores iguales")
End If
'salida de la informacion
txtva.Text = variablea
txtvb.Text = variableb
txtvc.Text = variablec
txtnmenor.Text = nmenor
txtnmayor.Text = nmayor
End Sub
Private Sub btnnuevo_Click(sender As Object, e As EventArgs) Handles btnnuevo.Click
txtva.Clear()
txtvb.Clear()
txtvc.Clear()
txtnmenor.Clear()
txtnmayor.Clear()

You might also like