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.

13 lines
277 B

#include <bits/stdc++.h>
using namespace std;
#define maxn 105
int a[maxn];
int main() {
int x, n = 0;
while (scanf("%d", &x) == 1) a[n++] = x; //以ctrl+d结束输入
for (int i = n - 1; i >= 1; i--) printf("%d ", a[i]);
printf("%d\n", a[0]);
return 0;
}