#include<stdio.h> int main() { char c[100]; int i=0,n; scanf("%s",c); while(c[i]!='\0') i++; n=i; for(i=n-1;i>=0;i--) printf("%c",c[i]); putchar('\n'); return 0; }
char s[ 100 ]; char *end; char *start; start = s; end = &s[ strlen( s ) - 1 ]; for(; end >= start; --end ) printf( "%c", *end );
[此贴子已经被作者于2017-10-4 21:40编辑过]