請(qǐng)問(wèn)哪里錯(cuò)了???
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
for(;num!=0,count<=10;count++){
??? num/=10;
}
System.out.println("它是個(gè)"+count+"位數(shù)");
}
}
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
for(;num!=0,count<=10;count++){
??? num/=10;
}
System.out.println("它是個(gè)"+count+"位數(shù)");
}
}
? ? ? (錯(cuò)了請(qǐng)指正)? 如果表達(dá)的是: num能除10一次count就加一;
if(num/10!=0){
? ? count++;
}
舉報(bào)
2020-10-14
多個(gè)判斷條件,不能使用逗號(hào),需要 &&