解题思路:
注意事项:
参考代码:
#include<stdio.h>
#include<string.h>
int main()
{
char s[100];
int i,j,n;
gets(s);
n=strlen (s);
for(i=0;i<n;i++)
scanf("%d",&s[i]);
for(i=0,j=n-1;i<j;i++,j--)
{
if(s[i]!=s[j])
break;
}
if(i>=j)
printf("YES");
else
printf("NO");
return 0;
}
0.0分
0 人评分