Leap year program in C

Posted on

Leap year program in C

C program to check leap year. This program takes a year as input and finds whether a year is the leap year or not. C Program to Find if a given Year is a Leap Year

We generally assume that if a year number is evenly divisible by 4 is the leap year. But it is not the only case. A year is a leap year if −

  • It is evenly divisible by 100
    • If it is divisible by 100, then it should also be divisible by 400
  • Except this, all other years evenly divisible by 4 are leap years.

Let’s see how to we can create a program to find if a year is a leap or not