帮我看一下哪里不对,输出是对的
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
int b=1;
for (int i=1;i<10;i++){
b*=10;
if (num<b){
System.out.println("它是个"+i+"位的数!");
break;
}
}
}
}
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
int b=1;
for (int i=1;i<10;i++){
b*=10;
if (num<b){
System.out.println("它是个"+i+"位的数!");
break;
}
}
}
}
2017-05-18
举报