C Programming Code Examples C > Beginners Lab Assignments Code Examples Leap Year Program In C Leap Year Program In C Finding a year is leap or not is a bit tricky. We generally assume that if a year number is evenly divisible by 4 is 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. #include <stdio.h> int main() { int year; year = 2096; if (((year % 4 == 0) && (year % 100!= 0)) || (year%400 == 0)) printf("%d is a leap year", year); else printf("%d is not a leap year", year); return 0; } procedure leap_year() IF year%4 = 0 AND year%100 != 0 OR year%400 = 0 PRINT year is leap ELSE PRINT year is not leap END IF end procedure