#include<stdio.h>
#include<conio.h>
int main(void)
{
int year;
printf("Enter the year: ");
scanf("%d",&year);
if(year%400 ==0 || (year%100 != 0 && year%4 == 0))
{
printf("Year %d is a leap year",year);
}
else
{
printf("Year %d is not a leap year",year);
}
return 0;
getch();
}
0 comments:
Post a Comment