#include "stdafx.h"//If the vc++6.0, with this line.//
#include "stdio.h"
int main(int argc,char *argv[]){
char s[11],i;
printf("Please enter no more than 10 letters...\n");
for(i=0;i<10;i++)
if((s[i]=getchar())=='.')
break;
for(i--;i>=0;printf("%c",s[i--]));
printf("\n");
return 0;
}
运行样例: