java连续输入多个数字,为啥不行啊!!懊恼
packagech01;importjava.util.Scanner;publicclassText08{publicstaticvoidmain(String[]ar...
package ch01;
import java.util.Scanner;
public class Text08 {
public static void main(String[] args) {
int i = 0;int x;
for ( i = 0;i< 20;i++){
int a[]=new int[i];
Scanner x=new Scanner(System.in);
x=in.nextInt();
a[i]=x;
while(a[i]==0){
for ( i = 0;i< 20;i++){
}
}
}
}
} 展开
import java.util.Scanner;
public class Text08 {
public static void main(String[] args) {
int i = 0;int x;
for ( i = 0;i< 20;i++){
int a[]=new int[i];
Scanner x=new Scanner(System.in);
x=in.nextInt();
a[i]=x;
while(a[i]==0){
for ( i = 0;i< 20;i++){
}
}
}
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询