Ejercicio
Matriz de números pares
Objetivo
Escriba un programa de Visual Basic para pedir al usuario 10 números enteros y mostrar los pares.
Código
Imports System
Public Class exercise74
Public Shared Sub Main()
Dim numbers As Integer() = New Integer(9) {}
For i As Integer = 0 To 10 - 1
Console.Write("Numero {0}= ", i + 1)
numbers(i) = Convert.ToInt32(Console.ReadLine())
Next
For i As Integer = 0 To 10 - 1
If numbers(i) Mod 2 = 0 Then Console.Write("{0} ", numbers(i))
Next
End Sub
End Class