Ver Mensaje Individual
  #5 (permalink)  
Antiguo 26/10/2008, 17:33
megaligathor
 
Fecha de Ingreso: septiembre-2008
Mensajes: 68
Antigüedad: 15 años, 5 meses
Puntos: 0
Sonrisa Respuesta: mostrar el mayor y menor elemento de un vector

Saludos, si tambien puedes usar eso en caso de ser arreglos. Bueno aqui te mando la corrección funcionando.

Código:
Dim b As Integer
        Dim c As Integer
        Dim a() As Long

        b = TextBox1.Text
        c = TextBox1.Text

        ReDim a(b)

        For i As Integer = 0 To b - 1
            a(i) = InputBox("Ingrese Datos")

            TextBox2.Text = TextBox2.Text + "  " + a(i).ToString

            If a(i) < b Then
                b = a(i)
            End If

            If a(i) > c Then
                c = a(i)
            End If

        Next

        MsgBox("el mayor es  " & c)
        MsgBox("el menor es  " & b)
Analizalo. Espero que sea de ayuda

ATTE RealTMegalix