用栈的思想
//第二种思路,使用栈
#include<stdio.h>
//定义一个栈
char a[81][81];
int top = 0;
int main(void)
{
do{
scanf("%s", a[top]);
top++;
}while(getchar()!='\n');
top--;
while(top != 0)
{
printf("%s ", a[top]);
top--;
}
printf("%s\n", a[top]);
}