提交出錯(cuò),求解
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("它是個(gè)"+count+"位的數(shù)!");
}
}
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("它是個(gè)"+count+"位的數(shù)!");
}
}
2015-07-13
舉報(bào)
2015-07-13
兩個(gè)都不能提交,大神在哪了
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("它是個(gè)"+count+"位的數(shù)!");
}else{
? ? System.out.println("超出范圍");
}
}
}