//Program to check wheather the given year is leap year or not.
#include<stdio.h>
#include<conio.h>
void main()
{
int year;
clrscr();
printf("To check wheather the given year is leap year or not");
printf("\nPlease enter the year:");
scanf("%d",&year);
if(year%100==0)
{
if(year%400==0)
{
printf("\nThe entered year (%d) is leap year",year);
}
else
{
printf("\nThe entered year (%d) is not leap year",year);
getch();
exit();
}
}
else
{
if(year%4==0)
{
printf("\nThe entered year (%d) is leap year",year);
}
else
{
printf("\nThe entered year (%d) is not leap year",year);
}
}
getch();
}