這個代碼哪里有問題?運行出來都是對的?????
public class HelloWorld{
??? public static void main(String[] args){
?? ??? ?int num = 999;
?? ??? ?int count = 0;
?? ??? ?for(;count<=10;count++){
?? ??? ???? if((num%Math.pow(10,count))!=num){
?? ?
?? ??? ???????? continue;
?? ??? ???? }
?? ??? ???? else{
?? ??? ???????? break;
?? ??? ?????? }
?? ??? ???? }
?? ??? ?System.out.println("它是個"+count+"位的數(shù)!");
?? ??? ?}
?? ??? ?}
2016-08-30
運行確實沒問題
2016-08-30
如果是小數(shù)不行
2016-08-30
如果是0是幾位數(shù)?