voidpalindrome(charsal[120]) {inti, length;intpalindrome = 0; cout <<"Enter a string: "; cin >> sal; length = strlen(sal);for(i=0;i < length ;i++){if(sal[i] != sal[length-i-1]) { palindrome = 1;break; } } cout<<"In reverse order: "<<strrev(sal) << endl;if(pali...
滚动数组:http://blog.csdn.net/insistgogo/article/details/8581215 1#include <cstdio>2#include <cstring>3#include <iostream>4usingnamespacestd;5chara[5050], b[5050];6intdp[2][5050];7intmain()8{9intn;10while(~scanf("%d", &n))11{12scanf("%s", b);13strcpy(a, b);14strrev(b);...
equals(strRev)) { System.out.println(str + " is a Palindrome!"); } else { System.out.println(str + " is not a Palindrome!"); } } } Output The original String is: ABABA ABABA is a Palindrome! Example 3 This is another Java program to check if a given number is palindrome ...