مثالی برای چاپ اعضای زوج در آرایه با سی شارپ رو براتون حل کردم
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Array_3
{
internal class Program
{
static void Main(string[] args)
{
int [] a = { 2, 3, 4, 5, 6, 7, 8, 9, 10 , 11 };
for ( int i = 0 ; i <= 9 ; i++)
{
if (a[i] % 2 == 0)
Console.WriteLine("{0}", a[i]);
}
}
}
}
- ۰۱/۰۶/۱۷