import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Ler o número inteiro N
int N = sc.nextInt();
int[] numeros = new int[N];
// Ler os N números inteiros
for (int i = 0; i < N; i++) {
numeros[i] = sc.nextInt();
}
// Imprimir os números na ordem inversa
for (int i = N - 1; i >= 0; i--) {
System.out.println(numeros[i]);
}
sc.close();
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: