分别用二进制,八进制,十六进制表示十进制数27.
发布网友
发布时间:2022-04-23 19:39
我来回答
共2个回答
热心网友
时间:2023-06-10 18:58
灞曞紑鍏ㄩ儴public static void main(String[] args) {
// TODO Auto-generated method stub
Integer a = 27;
String two = Integer.toBinaryString(a);//浜岃繘鍒?br /> String sixteen = Integer.toHexString(a);//16杩涘埗
String eight = Integer.toOctalString(a);//8杩涘埗
System.out.println(two); //11011
System.out.println(sixteen); //1b
System.out.println(eight); //33
}
鐩稿叧璧勬枡
http://zhidao.baidu.com/link?url=N7CPL9ZAFjcIHqqZUlFXe23OOM6cvVj9dFDfaVE2j-1G6rtJp25ocf47AGWj5acYfPmVtOlZSKzbulbtGImZN_
热心网友
时间:2023-07-20 02:18
public static void main(String[] args) {
// TODO Auto-generated method stub
Integer a = 27;
String two = Integer.toBinaryString(a);//二进制
String sixteen = Integer.toHexString(a);//16进制
String eight = Integer.toOctalString(a);//8进制
System.out.println(two); //11011
System.out.println(sixteen); //1b
System.out.println(eight); //33
}
相关资料
http://zhidao.baidu.com/link?url=N7CPL9ZAFjcIHqqZUlFXe23OOM6cvVj9dFDfaVE2j-1G6rtJp25ocf47AGWj5acYfPmVtOlZSKzbulbtGImZN_
热心网友
时间:2023-07-20 02:18
二进制:11011
八进制:033
十六进制:1B追问我要整个过程,谢谢。