LEAP YEAR PROGRAM IN C LANGUAGE
#include<stdio.h>
void main()
{
int y;
printf("enter the year:\t");
scanf("%d",&y);
if(y%100==0)
{
if(y%400==0)
{
printf("%d is leap year");
}
else
{
printf(" %d is not a leap year");
}
}
else
{
if(y%4==0)
{
printf("%d is a leap year");
}
else
{
printf("%d is not a leap year");
}
}
}
OUTPUT:
enter the year: 100
100 is not a leap year