|
First Summer 2006 |
We then discuss this problem (whose number was 10, once, in a list of problems):
| 10. |
A year with 366 days is called a leap year. A year is a leap year if
There were no exceptions before the introduction of the Gregorian calendar on October 15, 1582 (for example, the year 1500 was a leap year).
Write a program
(called
|
|
Here's a sample run of such a program:
frilled.cs.indiana.edu%java Ten Please enter the year then press Enter : 1500 Leap year: 1500 frilled.cs.indiana.edu%java Ten Please enter the year then press Enter : 1900 1900 not a leap year! frilled.cs.indiana.edu%java Ten Please enter the year then press Enter : 1996 Leap year: 1996 frilled.cs.indiana.edu%java Ten Please enter the year then press Enter : 1997 1997 not a leap year! frilled.cs.indiana.edu%java Ten Please enter the year then press Enter : 2000 Leap year: 2000 frilled.cs.indiana.edu% | |
We will develop a program in Python, of course.