Fixed typos

This commit is contained in:
2020-06-17 18:14:53 -04:00
parent 768dc0c761
commit f4cfb03f58

View File

@@ -501,7 +501,7 @@ public class Algorithms{
//Return the list
return divisors;
}
//This function returns all the divisors of goalNumber
//This function returns all the divisors of goalSubscript
public static int getFib(int goalSubscript){
//Setup the variables
int[] fibNums = {1, 1, 0}; //A list to keep track of the Fibonacci numbers. It need only be 3 long because we only need the one we are working on and the last 2
@@ -517,7 +517,7 @@ public class Algorithms{
fibNums[fibLoc % 3] = fibNums[(fibLoc - 1) % 3] + fibNums[(fibLoc - 2) % 3];
}
//Return the propper number. The location counter is 1 off of the subscript
//Return the proper number. The location counter is 1 off of the subscript
return fibNums[(fibLoc - 1) % 3];
}
public static long getFib(long goalSubscript){
@@ -535,7 +535,7 @@ public class Algorithms{
fibNums[fibLoc % 3] = fibNums[(fibLoc - 1) % 3] + fibNums[(fibLoc - 2) % 3];
}
//Return the propper number. The location counter is 1 off of the subscript
//Return the proper number. The location counter is 1 off of the subscript
return fibNums[(fibLoc - 1) % 3];
}
public static BigInteger getFib(BigInteger goalSubscript){
@@ -553,7 +553,7 @@ public class Algorithms{
fibNums[fibLoc % 3] = fibNums[(fibLoc - 1) % 3].add(fibNums[(fibLoc - 2) % 3]);
}
//Return the propper number. The location counter is 1 off of the subscript
//Return the proper number. The location counter is 1 off of the subscript
return fibNums[(fibLoc - 1) % 3];
}
//This function returns a list of all Fibonacci numbers <= goalNumber