Advertisement
zeneksilant

1.8.5

Oct 23rd, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class main{
  3. public static void main(String[] args){
  4. Scanner in = new Scanner(System.in);
  5. int n = in.nextInt();
  6. int a[] = new int [n];
  7. for (int i = 0; i < n; i++) {
  8. a[i] = in.nextInt();
  9. }
  10. for (int j = n -1 ; j >= 0 ; j--) {
  11. System.out.print(a[j] + " ");
  12. }
  13. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement