Fixed error with accessing problem numbers that are not sequential

This commit is contained in:
2020-06-08 00:45:10 -04:00
parent 12d76ca77a
commit 52c416aa54

View File

@@ -86,13 +86,13 @@ public class Driver{
for(Integer problemLocation = 1;problemLocation < PROBLEM_NUMBERS.size();++problemLocation){
//Solve the problem
System.out.print(PROBLEM_NUMBERS.get(problemLocation).toString() + ". ");
solveProblem(PROBLEM_NUMBERS.get(problemLocation));
solveProblem(problemLocation);
}
}
//This is if a single problem number was chosen
else{
//Solve the problem
solveProblem(PROBLEM_NUMBERS.get(problemNumber));
solveProblem(problemNumber);
}
}
private static void solveProblem(Integer problemNumber){