#include<stdlib.h>
int main() {
int* fish = (int*)malloc(sizeof(int) * 101);
if (fish == NULL) {
printf("申请失败");
}
int top = -1;
//输入?看到的数据
while (1) {
scanf_s("%d", &fish[top+1]);
top++;
if (fish[top] == 0) {
break;
}
}
while (top!=0) {
printf("%d ",fish[top-1]);
top--;
}
return 0;
}