Page 2 of 2

Re: Divisibility by 4 ie. Leap Year

Posted: Fri Dec 09, 2005 7:40 pm
by moneo
zim wrote:Here's a trick I use to check for divisibility by 4, for Leap Years and such:
.....
Just in case you are not aware of it, the complete logic for determining if a year is a leap year is as follows:

If the year is evenly divisible by 4 and not divisible by 100,
or if the year is evenly divisible by 400,
then it's a leap year.
*****