Leap Year Checker.

Conor P. Cahill cpcahil at virtech.uucp
Sun Sep 23 11:30:09 AEST 1990


In article <24700010 at sunc1> mccaugh at sunc1.cs.uiuc.edu writes:
>
> Ordinarily, a leap-year is a multiple of four, so thst -- given leap-year y --
> (y%4 == 0) ought to indicate if y designates a leap-year.

Actually a leap year is a year that is a multiple of 4 but not a multiple
of 100 unless it is also a multiple of 400.

So, 1900 is not a leap year, 1904 is, 1996 is, 2000 is, 2100 is not, etc.



-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 



More information about the Comp.lang.c mailing list