cours0708/workspace/G5a_exercices/fr/blankoworld/g5a/ConvertEntier.java

18 lines
522 B
Java
Raw Normal View History

2008-11-25 21:11:16 +00:00
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<61>cimale : " + parametre + " => " + Integer.toHexString(parametre));
}
}