package javaTest;
import java.util.Scanner;
public class Test2 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n,i;
System.out.println("请输入数组a[]的元素个数");
try {
n = scanner.nextInt();
int[] a = new int[n];
for(i = 0; i < n; i++) {
System.out.println("请输入数组a[" + i + "]");
a[i] = scanner.nextInt();
}
scanner.close();
}
catch(Exception e) {
e.printStackTrace();
}
}
}
这个是在控制台里面输入数组,求问输入完后要判断里面哪些是水仙花数怎么写