求助,为什么输出count是10
{
public static void main(String[] args){
int num = 999;
int count = 0;
for(int i = 0;i<=9;i++){
chufa = num/(10^i);
if(chufa==0){
break;
}else{
count++;
}
}
System.out.println("它是个"+count+"位的数!");
}
}
{
public static void main(String[] args){
int num = 999;
int count = 0;
for(int i = 0;i<=9;i++){
chufa = num/(10^i);
if(chufa==0){
break;
}else{
count++;
}
}
System.out.println("它是个"+count+"位的数!");
}
}
2018-07-24
举报