提交出錯,求解
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
for(count=1;count<10;count++){
? ? num=num/10;
? ? if(num==0){
? ? ? ? break;
? ? }
}
System.out.println("它是個"+count+"位的數!");
}
}
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
for(count=1;count<10;count++){
? ? num=num/10;
? ? if(num==0){
? ? ? ? break;
? ? }
}
System.out.println("它是個"+count+"位的數!");
}
}
2015-07-13
舉報
2015-07-13
兩個都不能提交,大神在哪了
2015-07-13
public class HelloWorld{
public static void main(String[] args){
int num = 999;
int count = 0;
if(num<1000000000&&num>0){
for(count=1;count<10;count++){
? ? num=num/10;
? ? if(num==0){
? ? ? ? break;
? ? }
}
System.out.println("它是個"+count+"位的數!");
}else{
? ? System.out.println("超出范圍");
}
}
}