/*
回文判断
*/
#include <iostream>
using namespace std;
bool isHuiwen(char *str)
{
int len = strlen(str);
for(int index = 0;index < len/2;index++)
if(str[index] != str[len - 1- index])
return 0;
return 1;
}
int main()
{
char *s1 = "abcba";
char *s2 = "abcdcab";
if(isHuiwen(s1))
cout << s1 << ":" << "huiwen";
else
cout << s1 << ":" << "not huiwen";
if(isHuiwen(s2))
cout << s2 << ":" << "huiwen";
else
cout << s2 << ":" << "not huiwen";
return 0;
}