Subject: Leap year 91. ***** Q: Is 2000 a leap year? What is the leap year algorithm? A: With the approaching turn of the century this question is becoming more and more common. Here is the algorithm in Turbo Pascal. function ISLEAP (y : integer) : boolean; begin isleap := (y mod 4 = 0) and not ((y mod 100 = 0) and not (y mod 400 = 0)); end; (* isleap *) My thanks are due to Dr. John Stockton and Associate Professor Seppo Pynnonen for confirming the result. In fact it was who John suggested adding this question to the FAQ. There are several equivalent formulations achieving the same result. Also nested multi-line if statments could be used. The boolean statements are much more concise, even if not very easy to construct. --------------------------------------------------------------------