Input Format
The first line of the input contains ,where  is the number of integers.The next line contains  integers separated by a space.
Constraints
, where  is the  integer in the array.
Output Format
Print the  integers of the array in the reverse order in a single line separated by a space.

hackerrank array introduction problem solution in c++ programming

Array Introduction problem solution in c++ programming | HackerRank

#include <iostream>
int main() {
    int N,i=0;
    std::cin>>N;
    int *A = new int[N];
    while(std::cin>>A[i++]);
    while(std::cout<<A[--N]<<' ' && N);
    delete[] A;
    return 0;
}