Your personal Tumblr library awaits
This is how you work out whether if a particular year is a leap year.
On every year that is divisible by 4 with no remainder
Except every year that is evenly divisible by 100 with no remainder
Unless the year is also divisible by 400 with no remainder
Source: Angela Yu, Udemy, 2024
Year 2000:
2000 ÷ 4 = 500 (Leap)
2000 ÷ 100 = 20 (Not Leap)
2000 ÷ 400 = 5 (Leap!)
So, year 2000 is a leap year.
Year 2100:
2100 ÷ 4 = 525 (Leap)
2100 ÷ 100 = 21 (Not Leap)
2100 ÷ 400 = 5.25 (Not Leap)
But year 2100 is not a leap year.
Post #113: Free Programming Exercise, Leap Year, 2024.