请问下我这样打会有什么问题吗
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
for(int i=1;;i=i*10){
if(num>=i){
count=count+1;
}else{
System.out.println("它是个"+count+"位的数!");
break;
}
}
}
}
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
for(int i=1;;i=i*10){
if(num>=i){
count=count+1;
}else{
System.out.println("它是个"+count+"位的数!");
break;
}
}
}
}
2019-01-04
举报