import java.util.Arrays; import java.util.Scanner;
public class Main { public static void main(String[] args) { int[] arr = new int[6]; Scanner scanner = new Scanner(System.in); for (int i = 0; i < arr.length; i++) { arr[i] = scanner.nextInt(); } System.out.println(Arrays.toString(arr));
//write your code here......
int length = arr.length;//数组的长度
int len = length/2;//数组的中间索引下标
int temp = 0;
//遍历数组的前半部分,将前半部分与后半部分互换
for(int i=0;i<len;i++){//数组倒置
temp = arr[i];
arr[i] = arr[length-1-i];
arr[length-1-i] = temp;
}
System.out.println(Arrays.toString(arr));
}
}