You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
390 B

#include <bits/stdc++.h>
using namespace std;
int main() {
//录入数据到vector数组
int n;
cin >> n;
vector<int> vec;
for (int i = 0; i < n; i++) {
int c;
cin >> c;
vec.push_back(c);
}
//倒序输出
for (int i = n - 1; i >= 0; i--) {
cout << vec[i] << " ";
}
cout << endl;
return 0;
}