# C program to find out whether a given year is a leap year or not

In this tutorial, we will see C program to check leap year.

Leap year is the year which has 366 days including 29 feb in a year.

Here is formula for calculating leap year.

If Year is divisible by 4 and (not divisible by 100 or divisble by 400) then it is a leap year.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
#include<stdio.h> int main() { int year; printf("Enter any year(4-digit):"); scanf("%d",&year); if(year%400==0|| (year%4==0 && year%100!=0)) { printf("\n%d is leap Year",year); } else { printf("\n%d is not leap year",year); } return 0; } |

That’s all about checking leap year in c.