为什么我的结果会是2位?谢谢
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count;
for( count=1;(num/10)!=0;++count){
num=num%10;
}
System.out.println("它是个"+count+"位的数!");
}
}
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count;
for( count=1;(num/10)!=0;++count){
num=num%10;
}
System.out.println("它是个"+count+"位的数!");
}
}
2018-01-24
举报