#include<stdlib.h> #include<stdio.h> int main() { char a[5]; int i; while(scanf("%s",a)!=EOF) { for(i=strlen(a)-1;i>=0;i--) { printf("%c",a[i]); } printf("\n"); } return 0; } /************************************************************** Problem: 1058 User: kirchhoff Language: C Result: Accepted Time:70 ms Memory:912 kb ****************************************************************/
原文地址:http://blog.csdn.net/wdkirchhoff/article/details/42300655