cours0708/workspace/G5a_exercices/fr/blankoworld/g5a/ConvertEntier.java
2008-11-25 22:11:16 +01:00

18 lines
522 B
Java

package fr.blankoworld.g5a;
public class ConvertEntier {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int parametre = Integer.parseInt(args[0]);
System.out.println("en binaire: " + parametre + " => " + Integer.toBinaryString(parametre));
System.out.println("en octale : " + parametre + " => " + Integer.toOctalString(parametre));
System.out.println("en hexadécimale : " + parametre + " => " + Integer.toHexString(parametre));
}
}