2012-01-17 21:30:42Morris
[JAVA] a034. 二進位制轉換
import java.util.Scanner;
public class a034 {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int n;
while(cin.hasNextInt()) {
n = cin.nextInt();
System.out.println(Integer.toBinaryString(n));
}
}
}
public class a034 {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int n;
while(cin.hasNextInt()) {
n = cin.nextInt();
System.out.println(Integer.toBinaryString(n));
}
}
}
上一篇:[JAVA] a022. 迴文