arrays hackerrank solution in c 2b 2b

Solutions on MaxInterview for arrays hackerrank solution in c 2b 2b by the best coders in the world

showing results for - "arrays hackerrank solution in c 2b 2b"
Flavie
14 Nov 2019
1#include <cmath>
2#include <cstdio>
3#include <vector>
4#include <iostream>
5#include <algorithm>
6using namespace std;
7
8
9int main() {
10    /* Enter your code here. Read input from STDIN. Print output to STDOUT */  
11    int n,i=0;
12    cin>>n;
13    int *a = new int[n];
14    while(cin>>a[i++]);
15    while(cout<<a[--n]<<' '&& n);
16    delete[] a; 
17    return 0;
18}
19