Skip to content

Commit

Permalink
Do not cast Math.abs into int
Browse files Browse the repository at this point in the history
  • Loading branch information
fatosmorina committed Apr 8, 2017
1 parent 8005d6c commit c340ffd
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 @@ -65,7 +65,7 @@ public static void main(String[] args) {
boolean isNegative = false;
if (number < 0) {
isNegative = true;
number = (int) Math.abs(number);
number = Math.abs(number);
}
int originalNumber = number;
formatOutput(originalNumber, getPrimeFactors(originalNumber), isNegative);
Expand Down

0 comments on commit c340ffd

Please sign in to comment.