#include <string.h>
#include <stdio.h>
int hui(char *a)
{
int i, k, j = 0;
while(a[j]!='\0')
{
j++;
}
for (i = 0, k = j-1; i<=k; i++, k--)
if (a[i] != a[k]) return 0;
return 1;
}
int main()
{
int x;
char a[15];
gets(a);
puts(a);
x = hui(a);
if (x == 1)
printf("this is huiwen!!!");
else
printf("this is not huiwen!!!");
}
回文判断1129
最新推荐文章于 2024-09-04 14:45:59 发布