Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main6 {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int n = scan.nextInt();
- int arr[] = new int[n];
- for (int a = 0; a < n; a++) {
- arr[a] = scan.nextInt();
- }
- for (int i = arr.length - 1; i >= 0; i--) {
- System.out.print(arr[i] + " ");
- }
- }
- }
Add Comment
Please, Sign In to add comment