char str[100]; cout << "Enter a word to check :"; cin >> str; int x = strlen(str)-1; for(int I = 0; I <= x; I++) { if (str[I] == str[x-I]) { continue; } else { cout<<"Not a palidrome"<<endl; return 0; } }
cout << "Entered word is Polindrome"<<endl; return 0; }