#include <iostream> using namespace std; int main() { int num,i; cin >> num; int* stack = new int[num]; for(i = 0;i < num; i++){ cin >> stack[i]; } for(i = num - 1;i >= 0; i--){ cout << stack[i] << " "; } }
#include <iostream> using namespace std; int main() { int num,i; cin >> num; int* stack = new int[num]; for(i = 0;i < num; i++){ cin >> stack[i]; } for(i = num - 1;i >= 0; i--){ cout << stack[i] << " "; } }