輸出答案了,為啥還讓我再試試
public class HelloWorld{ public static void main(String[] args){ ? ? ? ?int num = 999; ? ? ? ?int count = 0; ? ? ? for(;num>0;){ ? ? ? ? ? ?num=num/10; ? ? ? ? ? ?count++; ? ? ? ?} ? ? ? ?System.out.println("它是個" + count + "位的數!"); ? ?} } 為啥不對?。。?/p>
2017-07-19
你要判斷這個數是小于十位數的數啊,有要求的
2017-07-19
for(num>=0 && num<=999999999)