Your leap year example gives false results for the years 1900, 2100 and others. The leap year rules are: 1. Years that are multiples of 4 are leap years, except for the following special years. 2. Years that are mutliples of 100 are not leap years, except for the following special years. 3. Years that are multiples 400 are leap years. Your program does not obey to rule 2.