import java.util.*;
public class test5 {
public static void main(String[] args) {
Scanner input= new Scanner(System.in);
System.out.print("请输入数组的长度:");
int num=input.nextInt();
int[] score=new int[num];
for(int i=0;i
score[i]=input.nextInt();
}
System.out.println("\n逆序后为:");
for(int i = 0;i < num/2-1 ;i++){
int temp = score[i];
score[i] = score[num-1-i];
score[num-1-i] = temp;
}
for(int i=0;i
}
}
}
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
String a[] = new String[5];
Scanner in = new Scanner(System.in);
for(int i=0;i<5;i++){
a[i] = in.next();
}
for(int j=4;j>=0;j--){
System.out.print(a[j]+'\t');
}
}
}