描述
接受一个只包含小写字母的字符串,然后输出该字符串反转后的字符串。(字符串长度不超过1000)
输入描述:
输入一行,为一个只包含小写字母的字符串。
输出描述:
输出该字符串反转后的字符串。
#include<stdio.h>
#include<string.h>
int main()
{
char s[1024];
while(scanf("%s",s)!=EOF)
{
int i=0,n=strlen(s);
for(i=n-1;i>=0;i--)
printf("%c",s[i]);
}
}