Sort by

recency

|

2036 Discussions

|

  • + 0 comments
        for(int i = n - 1; i > 0; i--)
        {
                    Console.Write(arr[i] + " ");
        }
    
        Console.Write(arr[0]);
    
  • + 0 comments

    if name == 'main': n = int(input().strip())

    arr = list(map(int, input().rstrip().split()))
    for i in range (len(arr)):
        print(arr[-i-1],end=' ')
    
  • + 0 comments

    JavaScript

    console.log(arr.reverse().join(" "));
    
  • + 0 comments

    print(*arr[::-1])

  • + 0 comments

    n = int(input().strip())

    arr = list(map(int, input().rstrip().split()))
    print(" ".join(map(str, arr[::-1])))