close
public class IFDemo5 {
public static void main(String[] args) {
int num=10;
String data = "";
for(;;)
{
int temp = num % 2;
data = temp + data;
num = num/2;
if(num == 0)
break;
}
System.out.println("10="+data);
}
}
全站熱搜