Exercise
Array Of Even Numbers
Objetive
Write a C# program to ask the user for 10 integer numbers and display the even ones.
Example Code
using System;
public class exercise74
{
public static void Main()
{
int[] numbers = new int[10];
for (int i = 0; i < 10; i++)
{
Console.Write("Numero {0}= ", i + 1);
numbers[i] = Convert.ToInt32(Console.ReadLine());
}
for (int i = 0; i < 10; i++)
if (numbers[i] % 2 == 0)
Console.Write("{0} ", numbers[i]);
}
}