Answers for "Arrays hackerrank solution in c++"

C++
0

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;
}
Posted by: Guest on June-08-2020

Code answers related to "Arrays hackerrank solution in c++"

Browse Popular Code Answers by Language