#include<stdio.h>
int main(
void)
{
int i,n,m;
char s[
10];
printf("Enter a string:");
i=
0;
while((s[i]=getchar())!=
'\n')
i++
;
s[i]=
'\0';
for(n=
0,m=i-
1;n<m;n++,m--
)
if(s[n]!=
s[m])
break;
if(n>=
m)
printf("It is a plalindrome\n");
else
printf("It is not a plalindrome\n");
return 0;
}
转载于:https://www.cnblogs.com/liruijia199531/p/3358431.html
转载请注明原文地址: https://win8.8miu.com/read-1558823.html