麻煩看看到底是哪里出問題了,它顯示運(yùn)行成功,但輸出錯(cuò)誤
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
if(num>=0 && num<= 999999999){
while(num!=0){
count++;
num/=10;
}
System.out.println("它是個(gè)"+count+"位的數(shù)!");
}else{
System.out.println("輸入有誤!");
}
}
}
2020-02-19
System.out.println("它是個(gè)"+count+"位的數(shù)!");? 后面的感嘆號(hào)應(yīng)該是中文!
2020-02-19
中文!