1192:回文字符串

#include<stdio.h>
#include<string.h>
int main()
{
	char s[1002];
	while(scanf("%s",s)!=EOF)
	{
		int i,j;
		for(i=0,j=strlen(s)-1;i<j;++i,--j)
		{
			if(s[i]!=s[j])
				break;
		}
		if(i<j)
			printf("No!\n");
		else
			printf("Yes!\n");
	}
	return 0;
}

 

posted @ 2012-04-11 00:02  dupuleng  阅读(82)  评论(0)    收藏  举报