题目讲解
2025-08-23 16:18:15
发布于:辽宁
0阅读
0回复
0点赞
这道题也不难,我就略讲一下:
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int x[n];
//定义数组(罗天擎本人讲解)
for (int i = 0; i < n; ++i) {
cin >> x[i];
//输入
}
for (int j = n - 1; j >= 0; --j) {
cout << x[j];
cout << " ";
//循环输出数组
}
return 0;
}
这里空空如也
有帮助,赞一个