不知道哪里出問題
int num = 999; int count = 0; if (num >= 0 ?&& num<=999999999){ ? while(num != 0){ ? ? ? ? ? ? ? ? ? count++; ? ? ? ? ? ? ? ? ? ? ? ? ? num/=10; ? ? ? ? ? ? ? ? ? ? ? ? ? ?} System.out.println("它是個"+ count+"位的數!"); } else{ System.out.println("輸入有誤!"); 哪里出問題了
2022-03-23
System.out.println()--System的out屬性中的println方法nbsp;quot;.quot;調用屬性及方法nbsp;我的長寬度變了,就是沒有3D的效果。。。。
2017-01-04
語法沒有錯,再看看中英文輸入法有沒有問題。還有,我覺得有時候是系統有bug。同樣的代碼復制回來就能通過了。
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("它是個"+ count+"位的數!");
????} else{?
????????System.out.println("輸入有誤!");
????????}
????}
}
2017-01-04
沒錯啊,再試試