For an year to be leap according to the Gregorian calendar, the following condition(conditions) should be satisfied.

**"The year should be divisible by 4. If the year is divisible by 100 also, then it should be divisible by 400 as well."**

(By divisible, we mean exactly divisible, i.e., with no remainder.)

**So for an year to be leap**

1. Check if the year is divisible by 4. If not divisible, its not a leap year. No further checks needed.

2. If divisible by 4, then check if the year is divisible by 100. If not divisible, it is a leap year. No further checks necessary.

3. If divisible by 100, check if the year is divisible by 400. If divisible by 400, then it is a leap year, else it is not a leap year.

**If...Then...Else**

If [not divisible by 4] then [not a leap year]

else if [not divisible by 100] then [leap year]

else if [divisible by 400] then [leap year]

else [not a leap year]

**Combinations**

Divisible by 4 | Divisible by 100 | Divisible by 400 | Leap Year ? |
---|

Yes | Yes | Yes | Yes |

Yes | Yes | No | No |

Yes | No | No(not required) | Yes |

No | No(not required) | No(not required) | No |

**Examples**

Year | Divisble by 4 | Divisible by 100 | Divisible by 400 | Leap Year ? |
---|

1900 | Yes | Yes | No | NO |

1986 | No | Not required | Not required | NO |

1992 | Yes | No | Not required | YES |

1996 | Yes | No | Not required | YES |

2000 | Yes | Yes | Yes | YES |

2016 | Yes | No | Not required | YES |

2060 | Yes | No | Not required | YES |

2100 | Yes | Yes | No | NO |

2200 | Yes | Yes | No | NO |

2300 | Yes | Yes | No | NO |

2400 | Yes | Yes | Yes | YES |