#include <stdio.h>
#include <stdlib.h>
int main()
{
int i,j,n;
char str[10];
gets(str);
n=strlen(str);
for(i=0,j=n-1;i<j;i++,j--)
{
if(str[i]!=str[j])
{
printf("No\n");
break;
}
}
if(i>=j)printf("Yes\n");
return 0;
}
Problem C: 判断字符串是否为回文
最新推荐文章于 2022-05-13 19:31:47 发布