Apr-02-2022, 08:07 PM
I don't see this requirement stated in the problem.
One of your restrictions is wrong.
All leap years are divisible by 4.
Some years divisible by 4 are not leap years. If a year is divisible by 100 it is not a leap year UNLESS it is divisible by 400.
year % 2 == 0It doesn't matter, anything divisible by 4 is divisible by 2, but it shouldn't be there.
One of your restrictions is wrong.
All leap years are divisible by 4.
Some years divisible by 4 are not leap years. If a year is divisible by 100 it is not a leap year UNLESS it is divisible by 400.