Program to Check Leap Year in C language

Example
#include <conio.h>

#include <stdio.h>
void main()

{
int year;
printf("Enter a year: ");
scanf("%d", &year);

if (year % 400 == 0)

{
printf("%d is a leap year.", year);
}

else if (year % 100 == 0)

{
printf("%d is not a leap year.", year);
}

else if (year % 4 == 0)

{
printf("%d is a leap year.", year);
}

else

{
printf("%d is not a leap year.", year);
}

getch();
}
Program Output

          Enter a year: 2015
          2015 is not a leap year.