[ DelphiLand Discussion Forum ]

Posted by webmaster Guido on March 17, 2003

In Reply to: CAN YOU HELP ME PLEASE? posted by MIKE on March 17, 19103 at 10:14:55:

: Can you please help me without changing and of the commands.

: I need to write a program that prompts for a year in the range 1..9999. I have to determine if the year entered is a leap year, if it is then print the message IS LEAP YEAR, if it is not a leap year then print the message NOT LEAP YEAR. A leap year is a year that is divisible by 4. A year divisible by 100 is not a leap year unless it is also divisible 400. Repeat asking the user for a year until the number entered is not between 1..9999 Then terminate the program. And I need a friendly message should appear at termination of your program

: I need to use the following declarations in the program.

: const

: MAX_YEAR : integer = 9999;

: var

: year : integer; // year read from keyboard


You asked that same question already on March 12, and I answered it :)

[ DelphiLand Discussion Forum ]