C Program to check whether a year is a leap year or not
//This code is written by Souvik Ghosh
#include <stdio.h>
void leapYear(int year)
{
if (year % 400 == 0)
{
printf("Leap Year");
}
else if (year % 100 == 0)
{
printf("Not Leap Year");
}
else if (year % 4 == 0)
{
printf("Leap Year");
}
else
{
printf("Not Leap Year");
}
}
void main()
{
int year;
printf("Please enter the year you want to check leap year or not\n");
scanf("%d", &year);
leapYear(year);
}