- Ingresar tres números y en pantalla mostrar el numero mayor, intermedio y menor.
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim A, B, C, MAY, MEN, INTER As Integer
A = TextBox1.Text
B = TextBox2.Text
C = TextBox3.Text
MAY = A
If MAY < B Then MAY = B
If MAY < C Then MAY = C
MEN = A
If MEN > B Then MEN = B
If MEN > C Then MEN = C
INTER = A + B + C - MAY - MEN
TextBox4.Text = MAY
TextBox5.Text = INTER
TextBox6.Text = MEN
End Sub
End Class
No hay comentarios:
Publicar un comentario