Created
March 5, 2019 10:57
-
-
Save bastienapp/0344a7922bd766b8003975fc592c8744 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Mathematique { | |
public static void main(String[] args) { | |
if (args.length > 0) { | |
int n = Integer.parseInt(args[0]); | |
boolean result = nbPair(n); | |
System.out.println(result); | |
} else { | |
System.out.println("Passer un nombre en paramètre"); | |
} | |
} | |
public static boolean nbPair(int number) { | |
if (number % 2 == 0) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment