arrays hackerrank solution code example
Example: Arrays hackerrank solution in c++
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n,i=0;
cin>>n;
int *a = new int[n];
while(cin>>a[i++]);
while(cout<<a[--n]<<' '&& n);
delete[] a;
return 0;
}