51,410
社区成员
发帖
与我相关
我的任务
分享
Scanner sc = new Scanner(System.in);
int[] array = new int[5];
for (int i = 0; i < array.length; i++) {
System.err.println("输入数组的第"+(i+1)+"个数");
array[i] = sc.nextInt();
}
for (int i : array) {
System.err.print(i+" ");
}