BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int[] arr = new int[6];
int t = 0;
while (t <= 5) {
System.out.println("请输入一个整数");
int a = Integer.parseInt(br.readLine());
arr[t++] = a;
}
br.close();
int max = arr.length - 1;
int min = 0;
while (max > min) {
arr[max] = arr[min] ^ arr[max] ^ (arr[min] = arr[max]);
max--;
min++;
}
arr[3] = arr[5] ^ arr[3] ^ (arr[5] = arr[3]);
for (int i : arr) {
System.out.print(i + " ");
}