输出也为3,为什么错了
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
count = 1;
while(true){
if(num/10 != 0)
count += 1;
else
break;
num /=10;
}
System.out.println("它是"+count+"位的数!");
}
}