#include<stdio.h> #include<string.h> int main() { char str[100]; gets(str); int len=strlen(str); int i=0,j=len-1; char ch; while(i<j) { ch=str[i]; str[i]=str[j]; str[j]=ch; i++; j--; } puts(str); return 0; } |
Double click to view unformatted code.