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
241 B

#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int a[N];
int main() {
int x;
int idx;
while (cin >> x && x) a[idx++] = x;
for (int j = idx - 1; j >= 0; j--) cout << a[j] << " ";
return 0;
}