input: because you are nobody
output:nobody are you because
#include <stdio.h>
int main(){
char s[255];
int i = 0;
while((s[i] = getchar()) != '\n')
++i;
s[i--] = ' ';
int j = i; //用j记录每个单词的尾巴
while(j > 0){
i = j;
while(s[i] != ' ' && i > 0 )//i从后向前,到单
//词第一个字母停止
--i;
if(i != 0){ //not the first word
j = i++;
--j;
}else
j = i;
while(s[i] != ' ')
putchar(s[i++]);
putchar(' ');
}
putchar('\n');
return 0;
}