#include#includeint main(){int i, j, k;char s[50], temp;gets(s);//输入k = strlen(s);//计算字符的长度//反向输出for (i = 0, j = k - 1;i < k / 2;i++, j--){temp = s[i];s[i] = s[j];s[j] = temp;}puts(s);//输出}
#include#includeint main(){int i, j, k;char s[50], temp;gets(s);//输入k = strlen(s);//计算字符的长度//反向输出for (i = 0, j = k - 1;i < k / 2;i++, j--){temp = s[i];s[i] = s[j];s[j] = temp;}puts(s);//输出}