外层循环条件(count<=3)为什么不生效?
public class WeiShu {
public static void main(String[] args){
int num=2000000000;
int count=0;
for(;count<=3;){
for(;num>=1;count++){
num/=10;
}
System.out.println("它是"+count+"位数");
break;
}
}
}
public class WeiShu {
public static void main(String[] args){
int num=2000000000;
int count=0;
for(;count<=3;){
for(;num>=1;count++){
num/=10;
}
System.out.println("它是"+count+"位数");
break;
}
}
}
2017-02-03
举报