fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. short nTesty, nZawartosc;
  8.  
  9. cin >> nTesty;
  10.  
  11. for(short nLicznik=0; nLicznik<nTesty; ++nLicznik)
  12. {
  13. cin >> nZawartosc;
  14.  
  15. short naTablica[nZawartosc];
  16.  
  17. for(short nLicznik2=0; nLicznik2<nZawartosc; ++nLicznik2)
  18. {
  19. cin >> naTablica[nLicznik2];
  20. }
  21. for(short nLicznik2=nZawartosc-1; nLicznik2>=0; --nLicznik2)
  22. {
  23. cout << naTablica[nLicznik2] << " ";
  24. }
  25. cout << endl;
  26. }
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 15240KB
stdin
9
7 1 2 3 4 5 6 7
3 3 2 11
8 1 2 3 4 5 6 7 8
10 10 9 8 7 6 5 4 3 2 1
5 -1 -2 -3 4 5
10 -1 -2 -3 4 5 6 7 8 9 10
0
5 -45 47 -91 54 34
5 -7 65 33 0 12
stdout
7 6 5 4 3 2 1 
11 2 3 
8 7 6 5 4 3 2 1 
1 2 3 4 5 6 7 8 9 10 
5 4 -3 -2 -1 
10 9 8 7 6 5 4 -3 -2 -1 

34 54 -91 47 -45 
12 0 33 65 -7