Şubat ayi 28 her 4 sene de bir 29 cekmektedir..
Buna Göre Gireceğimiz yılda Şubat ayı 28 mi yoksa 29 mu çekiyor görelim..
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int sayi;
printf("Tanımlanacak Yılı Girin");
scanf ("%d",&sayi);
if (sayi %4==0 && sayi %100!=0 || sayi %400==0 )
printf("%d Artik yil \n",sayi);
else
printf ("Artik Bir Yil Değil..");
getch();
system("PAUSE");
return 0;
}
Buna Göre Gireceğimiz yılda Şubat ayı 28 mi yoksa 29 mu çekiyor görelim..
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int sayi;
printf("Tanımlanacak Yılı Girin");
scanf ("%d",&sayi);
if (sayi %4==0 && sayi %100!=0 || sayi %400==0 )
printf("%d Artik yil \n",sayi);
else
printf ("Artik Bir Yil Değil..");
getch();
system("PAUSE");
return 0;
}

