import java.util.*;
public class helloWorld {
public static void main(String[] args) {
Scanner num = new Scanner(System.in);
System.out.println("Enter the array size : ");
int size = num.nextInt();
int array[] = new int[size];
for (int i = 0; i < size; i++) {
System.out.println("Enter the " + (i + 1) + " number of array");
int m = num.nextInt();
}
int repl = 0 ;
for(int i = 0 ; i < array.length ;i++) {
repl = array[i];
array[i] = array[array.length-1-i];
}
for(int i =0 ; i< array.length ; i++) {
System.out.println(array[i]);
}
}
}
Scanner num = new Scanner(System.in);
System.out.println("Enter the array size : ");
int size = num.nextInt();
int array[] = new int[size];
for (int i = 0; i < size; i++) {
System.out.println("Enter the " + (i + 1) + " number of array");
int m = num.nextInt();
array[i] = m;
}
int repl = 0;
for (int i = 0; i < (array.length/2); i++) {
repl = array[i];
array[i] = array[array.length - 1 - i];
array[array.length - 1 - i] = repl;
}
for (int i = 0; i < array.length; i++) {
System.out.println(array[i]);
}