Skip to content

Commit

Permalink
Update APCalendar.java
Browse files Browse the repository at this point in the history
  • Loading branch information
saaltamirano1 committed May 4, 2024
1 parent 130bde8 commit e683c46
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/main/java/APCalendar.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ private static boolean isLeapYear(int year)
*/
public static int numberOfLeapYears(int year1, int year2)
{
int count = 0;
int count = 0;
for (int i = year1; i<=year2; i++){
if (isLeapYear(i)){
count++;
lights = new boolean [numRows][numCols];
for (int r = 0; r < numRows; r++){
for (int c = 0; c < numCols; c++){
lights[r][c] = Math.random() < 0.4;
}
}
return count;
}

/** Returns the value representing the day of the week for the first day of year,
Expand Down

0 comments on commit e683c46

Please sign in to comment.