Re: Divisibility by 4 ie. Leap Year
Posted: Fri Dec 09, 2005 7:40 pm
Just in case you are not aware of it, the complete logic for determining if a year is a leap year is as follows:zim wrote:Here's a trick I use to check for divisibility by 4, for Leap Years and such:
.....
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.
*****