Está en la página 1de 1

# include <iostream> # include <string> using namespace std; int main () { char palin[40]; int pal, x=0; int

con; cout<<"Ingrese SU palabra, tenga en cuenta que esta debe ir sin espacios: "; cin.getline(palin,40); longi=strlen(palin); for(con=pal-1;palin[con]==palin[x]&&con>=0;con--,x++) { if (x=pal) cout<<"ES UN PALINDROME"<<endl; else cout<<"NO ES UN PALINDROME"<<endl; } system ("pause"); return 0; }

También podría gustarte