fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int howManyTests, figure;
  8. int tab[100];
  9.  
  10. cin >> howManyTests;
  11.  
  12. for ( int i = 0; i < howManyTests; i++)
  13. {
  14. cin >> figure;
  15.  
  16. for (int i = 0; i <= figure; i++)
  17. {
  18. cin >> tab[i];
  19. }
  20.  
  21. for ( int i = figure - 1; i >=0; --i)
  22. {
  23. cout << tab[i] << " ";
  24. }
  25.  
  26. }
  27.  
  28. return 0;
  29. }
Success #stdin #stdout 0.01s 5300KB
stdin
Standard input is empty
stdout
Standard output is empty