public static void main(String[] args) {
int arr[] = new int[50];
Scanner sc = new Scanner(System.in);
System.out.println("输入一个数:");
int input = sc.nextInt();
int num = 0;
int max = arr[0];
for(int i = 0;i < arr.length-1;i++) {
arr[i] = (int)(input*Math.random());
if(arr[i] > max) {
max = arr[i];
}
System.out.println(max);
}
int arr[] = new int[50];
Scanner sc = new Scanner(System.in);
System.out.println("输入一个数:");
int input = sc.nextInt();
int num = 0;
int max = arr[0];
for(int i = 0;i < arr.length-1;i++) {
arr[i] = (int)(input*Math.random());
if(arr[i] > max) {
max = arr[i];
}
System.out.println(max);
}