for ve if kullnılarak mod operatörü (%) ile 2 ve 3 'e bölünebilen sayılar
[code lang="csharp"]
static void Main(string[] args)
{ int i;
for ( i= 5; i<121; i++)
{
if (i % 2 == 0 && i%3==0)
Console.WriteLine(i);
}
Console.ReadKey();
}
[/code]
Hiç yorum yok:
Yorum Gönder