• + 0 comments

    I wasn’t really feeling arrays today

        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            sb.insert(0, sc.nextInt() + " ");
        }
        System.out.println(sb.toString().trim());
        sc.close();