We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The year that is evenly divisible by 4 and not divisible by 100 is a leap year. It has to satisfy both the conditions.
Ex: 2016-->This is evenly divisible by 4, but not divisible by 100. So 2016 is a leap year.
1800-->This is evenly divisible by 4 as well as 100. So 1800 is not a leap year.
Any year that is evenly divisible by 400 is a leap year.
Ex: 2400--> This is divisible by 4 as well as 100, however, it is evenly divisible by 400. So that makes it a leap year.
Write a function
You are viewing a single comment's thread. Return to all comments →
The year that is evenly divisible by 4 and not divisible by 100 is a leap year. It has to satisfy both the conditions.
Ex: 2016-->This is evenly divisible by 4, but not divisible by 100. So 2016 is a leap year. 1800-->This is evenly divisible by 4 as well as 100. So 1800 is not a leap year.
Any year that is evenly divisible by 400 is a leap year. Ex: 2400--> This is divisible by 4 as well as 100, however, it is evenly divisible by 400. So that makes it a leap year.