Created
August 6, 2015 22:24
-
-
Save Maslor/bca02d0110ffcfefb6e2 to your computer and use it in GitHub Desktop.
return the symmetric of a positive number. Negative numbers aren't altered
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Negative { | |
public static int makeNegative(final int x) { | |
if(x >= 0) return -x; | |
else return x; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment