Did you know that a leap year does not every 4th year, all the time. There are exceptions to this rule since a year is 365.242199 days, not 365.25 days. Create a calculator that determines if a given year is a leap year. Assume a whole number 1-10000 is entered. Here's the Wikipedia pseudocode for how to make the adjustment: if (year is not divisible by 4) then (it is a common year) else if (year is not divisible by 100) then (it is a leap year) else if (year is not divisible by 400) then (it is a common year) else (it is a leap year)
read more https://en.wikipedia.org/wiki/Leap_year Test Cases: 1900 not a leap year 2000 leap year 2004 leap year 2012 leap year 2020 leap year 2100 not a leap year