package com.pack.array;
import java.util.Scanner;
public class ReverseArray {
public static void main(String[] args) {
int size;
Scanner sc=new Scanner(System.in);
System.out.println("Enter the size of array :");
size=sc.nextInt();
int arr[]=new int[size];
System.out.println("Enter "+size+" Elements");
for(int i=0;i<size;i++)
{
arr[i]=sc.nextInt();
}
for(int i=size-1;i>=0;i--)
{
System.out.print(arr[i]+"\t");
}
}
}
import java.util.Scanner;
public class ReverseArray {
public static void main(String[] args) {
int size;
Scanner sc=new Scanner(System.in);
System.out.println("Enter the size of array :");
size=sc.nextInt();
int arr[]=new int[size];
System.out.println("Enter "+size+" Elements");
for(int i=0;i<size;i++)
{
arr[i]=sc.nextInt();
}
for(int i=size-1;i>=0;i--)
{
System.out.print(arr[i]+"\t");
}
}
}