Dim ContarMayores35 As Integer = 0
Dim ContarMenores35 As Integer = 0
Dim Indice As Integer = 0
Dim IndiceMayor35 as Integer = 0
Dim Vector(10) As Integer
Dim Random As New Random()
Vector(Indice) = Random.Next(20, 50)
If Vector(Indice)>=35 Then
ContarMayores35 = ContarMayores35+1
Console.WriteLine("El número " + Vector(Indice).ToString() + " es mayor o igual a 35")
ContarMenores35 = ContarMenores35+1
Console.WriteLine("El número " + Vector(Indice).ToString() + " es menor a 35")
Dim VectorMayor35(ContarMayores35) As Integer
Dim VectorMenor35(ContarMenores35) As Integer
If Vector(Indice)>=35 Then
VectorMayor35(IndiceMayor35) = Vector(Indice)
IndiceMayor35 = IndiceMayor35+1
Console.WriteLine("Según el vector de números mayores o iguales a 35:")
For Indice=1 To ContarMayores35
Console.WriteLine("El número " + Vector(Indice).ToString() + " es mayor o igual a 35")
Console.WriteLine("Según el vector de números menores a 35:")
For Indice=1 To ContarMenores35
Console.WriteLine("El número " + Vector(Indice).ToString() + " es menor a 35")