Azra
Bronze Üye
-
- Katılım
- 11 Mart 2014
-
- Mesajlar
- 3.834
-
- Tepkime puanı
- 13
-
- ForumSAL Yaşı:
- 12 yıl 7 ay
- Kıdem:
- Forumun Eskisi
-
- Yaş
- 35
Kod:
int a, b, c,tek_sayi=0,cift_sayi=0 ;
Console.WriteLine("1. sayi girin");
a = Convert.ToInt32(Console.ReadLine());
if (a % 2 == 0)
{
++cift_sayi;
}
else
{
++tek_sayi;
}
Console.WriteLine("2. sayi girin");
b = Convert.ToInt32(Console.ReadLine());
if (b % 2 == 0)
{
++cift_sayi;
}
else
{
++tek_sayi;
}
Console.WriteLine("3. sayi girin");
c = Convert.ToInt32(Console.ReadLine());
if (c % 2 == 0)
{
++cift_sayi;
}
else
{
++tek_sayi;
}
Console.WriteLine("tek sayilar={0},çift sayilar={1}", tek_sayi, cift_sayi);
Console.ReadLine();