/** Returns the number of leap years between year1 and year2, inclusive.
* Precondition: 0 <= year1 <= year2
*/
public static int numberOfLeapYears(int year1, int year2)
{
int numOfLeapYears = 0;
for (int p = year1; p <= year2; p++)
{
if (isLeapYear (p))
numOfLeapYears++;
}
return numOfLeapYears;
/* to be implemented in part (a) */
}