#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define N 50
int cycle(char *s)
{
char *a,*b;
for(a=s,b=s+strlen(s)-1; b>a ;a++,b--)
{
if(*a!=*b)
{
break;
}
}
return b<=a;
};
int main()
{
char m[N];
int t;
scanf("%s",m);
if(cycle(m))
printf("%s is cycle string/n",m);
else
printf("s is not cycle string/n");
return 0;
};
参考别人编写的判断回文字符
最新推荐文章于 2022-05-08 22:15:06 发布