A leap year , which year is a containing one extra day .The earth takes 365 and 6 hours to revolves around the sun . February 29 date usually occurs every 4 four years that day count extra 6 hours( 6*4=24 hours mean extra one day ).A year will be leap year if it is a divisible by 4 and 400.
Example :
Example :
- 1988
- 2012
- 2016
- 2020
To Check Whether Given Year Is Leap Year or Not :
Program :
#include<stdio.h>
#include<conio.h>
void main()
{
int a=0;
char ch;
do{
clrscr();
printf("\n\t Enter year:");
scanf("%d",&a);
if(a%4==0||a%400==0)
printf("\n\t <%d> Year is LeapYear",a);
else
printf("\n\t <%d> Year is not LeapYear",a);
printf("\n\t continue (y/n):");
ch=getch();
}while(ch=='Y'||ch=='y');
}