static void Main(string[] args)
{
int[] a = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 23, 45, 65, 66, 88, 96 };
for(int i=0;i<a.Length;i++)//循环条件
{
if(a[i]%2==0)//筛选条件
Console.WriteLine(a[i] + " ");
}
Console.ReadKey();
}
时间: 2024-11-06 22:32:45