2019 FRQ
2019 FRQ
public static int numberOfLeapYears(int year1, int year2) {
int count = 0;
for (int year = year1; year <= year2; year++) {
if (isLeapYear(year)) {
count++;
}
}
return count;
}
public static int dayOfWeek(int month, int day, int year) {
return (firstDayOfYear(year) + dayOfYear(month, day, year) - 1) % 7;
}