Skip to content

Commit

Permalink
Turn number = number * (-1) into short form
Browse files Browse the repository at this point in the history
  • Loading branch information
fatosmorina committed Apr 8, 2017
1 parent c340ffd commit c754b98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UVa/PrimeFactors.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static List<Integer> getPrimeFactors(int number) {

static void formatOutput(int number, List<Integer> primeFactors, boolean isNegative) {
if (isNegative) {
number = number * (-1);
number *= -1;
}
StringBuilder output = new StringBuilder(number + " = ");
int numberOfPrimeFactors = primeFactors.size();
Expand Down

0 comments on commit c754b98

Please sign in to comment.