#include<stdio.h>
#include<string.h>
#define SIZE 1000
int main()
{
int i = 0, j = 0,k = 0;
char ch;
char a[SIZE][SIZE];
//把输入存在二位数组里
while((ch = getchar()) != '\n'){
if(ch != ' '){
a[i][j] = ch;
j++;
}
else{
j = 0;
i++;
}
}
//遍历数组输出
for(k = i;k >= 0;k--){
printf("%s",a[k]);
printf(" ");
}
return 0;
}
#include<string.h>
#define SIZE 1000
int main()
{
int i = 0, j = 0,k = 0;
char ch;
char a[SIZE][SIZE];
//把输入存在二位数组里
while((ch = getchar()) != '\n'){
if(ch != ' '){
a[i][j] = ch;
j++;
}
else{
j = 0;
i++;
}
}
//遍历数组输出
for(k = i;k >= 0;k--){
printf("%s",a[k]);
printf(" ");
}
return 0;
}