/* == is yr a leap year == */ int IsLeapYear(int Year) /* Return SUCCESS if Year is a leap year, FAIL otherwise */ { if ((Year % 4 == 0) && (Year % 4000 != 0) && ((Year % 100 != 0) || (Year % 400 == 0))) return(SUCCESS); return(FAIL); }
Originally posted as a Categorized Answer.
In reply to Re: Leap Year
by Anonymous Monk
in thread How do I determine if a given year is a leap year?
by Adam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |