001700 How to check if a year is a leap year

Follow these 4 steps in order to decide if in any given year, February is 28 days or 29 days.


We start by defining natural numbers as numbers other than zero with no fractions in it, Example: 1, 2, 3, 4, 5, and so on.


Step 1: Divide the given year by 400. If this results in a natural number. February is 29 days. Ignore steps 2, 3, and 4.

Example: the year 2000.


Step 2: Divide the given year by 100. If this results in a natural number. February is 28 days. Ignore steps 3 and 4.

Example the year 1900.


Step 3: Divide the given year by 4. If this results in a natural number. February is 29 days. Ignore step 4.

Example the year 2020.


Step 4: If steps 1, 2, and 3 do not apply, February is 28 days.

Example the year 2023.


More analysis and programming of leap years are under Library:


#KDXVAWRkXeTKDGTAE5BC5UDLYD