#include#include #include #include using namespace std;const char *rev = "A 3 HIL JM O 2TUVWXY51SE Z 8 ";//字符A-9的镜像字符,没有镜像则为空格const char * msg[] = { "not a palindrome","a regular palindrome","a mirrored string","a mirrired palindrome"};//输出字符串数组bool isPalindromes(char s[]) //判断是否为回文字符串{ long len = strlen(s); for(int i = 0;i
说明:
回文词:Palindromes 是指一个序列从正向遍历和逆向遍历得到的结果一样。比如ISABTCTBASI
镜像:Mirror是指一个序列按照中间元素左右对称。比如ESTAT23