下面这个代码为啥结果是0位数?
public class hello {
public static void main(String[] args) {
int count = 0;
for(int num = 9; (num/=10)>0 ;){
count++;
}
System.out.println("它是个"+count+"位数");
}
}
public class hello {
public static void main(String[] args) {
int count = 0;
for(int num = 9; (num/=10)>0 ;){
count++;
}
System.out.println("它是个"+count+"位数");
}
}
2017-08-01
举报