Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!wuarchive!udel!princeton!phoenix!pfalstad From: pfalstad@phoenix.Princeton.EDU (Paul John Falstad) Newsgroups: comp.lang.c Subject: Re: Leap Year Checker. Message-ID: <2743@idunno.Princeton.EDU> Date: 23 Sep 90 01:13:29 GMT References: <9464@uhccux.uhcc.Hawaii.Edu> <24700010@sunc1> Sender: news@idunno.Princeton.EDU Organization: Princeton University, Princeton, New Jersey Lines: 12 In article <24700010@sunc1> mccaugh@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. Except for century years. Only century years divisible by 400 are leap years. The correct formula is: (!(y % 4) && (y % 100 || !(y % 400))) Sorry to split hairs, but this IS usenet, after all. This is the silliest sketch I've ever been in!