Robert Adams (adms@math.ubc.ca)
Sun, 17 Jan 1999 08:12:03 -0800 (PST)
The period of the earth's orbit around the sun is approximately 365.2425
days. Observe that
0.2425 = (1/4) - (1/100) + (1/400)
Therefore ....
On Sun, 17 Jan 1999, Kevin Chu wrote:
> There is a blurb about leap years in K&R II p41.
>
> "A year is a leap year if it is divisible by 4 but not by 100, except
> that years divisible by 400 are leap years. Therefore
>
> if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
> printf("%d is a leap year\n", year);
> else
> printf("%d is not a leap year\n", year);
>
> [ end quote ]
>
> Typos mine.
>
> Kevin
>
> --
> Kevin Chu kevin@portal.ca
> http://members.tripod.com/~super_kevin/
>
Cheers,
Bob Adams
--- Robert A. Adams, Professor (604)-822-3783 (office) Department of Mathematics (604)-822-6074 (Department FAX) The University of British Columbia (604)-228-8550 (home) 1984 Mathematics Road (604)-228-8550 (home FAX) Vancouver, B.C. Canada V6T 1Z2 internet: adms@math.ubc.ca
This archive was generated by hypermail 2.0b3 on Sun 17 Jan 1999 - 08:12:20 PST