fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int i;
  6. cin >> i;
  7. int vet[i];
  8. for (int t = 0; t < i; t++) cin >> vet[t];
  9. for (int f = i - 1; f >= 0; f--) cout << vet[f] << " ";
  10. }
  11.  
  12. //https://pt.stackoverflow.com/q/241794/101
Success #stdin #stdout 0s 4348KB
stdin
9
1
2
3
4
5
6
7
8
9
stdout
9 8 7 6 5 4 3 2 1