mirror of
https://bitbucket.org/Mattrixwv/projecteulerjava.git
synced 2025-12-06 17:13:58 -05:00
Fixed error with accessing problem numbers that are not sequential
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user