Anatomia de la compu
Enviado por Roberto Salazar • 18 de Septiembre de 2015 • Trabajo • 1.402 Palabras (6 Páginas) • 87 Visitas
Imports System
Imports System.Console
Module Module1
Sub Main()
Dim numeros() As Integer = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20}
Dim dato, posicion As Integer
For i As Integer = 0 To numeros.GetUpperBound(0)
WriteLine("Posicion: {0}", i, numeros(i))
Next
WriteLine()
Write("¿Que valor desea encontrar? :")
dato = ReadLine()
For i As Integer = 0 To numeros.GetUpperBound(0)
If numeros(i) = dato Then
posicion = i
Exit For
End If
Next
If numeros(posicion) = dato Then
WriteLine("El valor se encontro en posicion {0}. ", posicion)
Else
WriteLine("No se encontro el valor")
End If
ReadLine()
End Sub
End Module
Imports System
Imports System.Console
Module Module1
Sub Main()
Dim numeros() As Integer = {1, 2, 3, 4, 5, 6}
Dim dato, posicion As Integer
For i As Integer = 0 To numeros.GetUpperBound(0)
WriteLine("Posicion: {0}", i, numeros(i))
Next
WriteLine()
Write("¿Que grado de primaria desea encontrar? :")
dato = ReadLine()
For i As Integer = 0 To numeros.GetUpperBound(0)
If numeros(i) = dato Then
posicion = i
Exit For
End If
Next
If numeros(posicion) = dato Then
WriteLine("El Grado se encontro en el grupo {0}. ", posicion)
Else
WriteLine("No se encontro el grupo")
End If
ReadLine()
End Sub
End Module
Imports System
Imports System.Console
Module Module1
Sub Main()
Dim numeros() As Integer = {1, 2, 3, 4, 5, 6}
Dim dato, posicion As Integer
For i As Integer = 0 To numeros.GetUpperBound(0)
WriteLine("Posicion: {0}", i, numeros(i))
Next
WriteLine()
Write("¿Que grado de primaria desea encontrar? :")
dato = ReadLine()
For i As Integer = 0 To numeros.GetUpperBound(0)
If numeros(i) = dato Then
...