do{goodgoodstudy();daydayup();}while(!died)
分类: C/C++
2011-05-16 12:41:08
int huiwen(char *a,int m,int n)
{
int k=1;
for(;m
while(a[m]==' ')
m++;
while(a[n]==' ')
n--;
if(a[m]==a[n])
{
m++;
n--;
}
else
{
k=0;
break;
}
}
return(k);
}
main()
{
int i,j;
char a[maxsize];
printf("输入,例如 a man a plan a canal panama\n");
gets(a);
i=0;
j=strlen(a)-1;
if(huiwen(a,i,j))
printf("this is huiwen\n");
else
printf("this isn't huiwen\n");
getch();
return 0;
}