There is a code that reveals whether a phrase or a word is a palindrome; there is such a code
#include "stdafx.h" #include "locale.h" #include <iostream> #include "windows.h" using namespace std; char slovo[80], prov[80] = { 0 }; int t = 0, i = 0, a, z=0, o=0; char* netprobelam(char *slovo) { do { if (slovo[z] == ' ') { o = z; z--; do { slovo[o] = slovo[o + 1]; } while (slovo[o] != '\0'); } z++; } while (slovo[z] != '\0'); return slovo; } int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); setlocale(LC_ALL, "Russian"); cin >> slovo; do { t++; } while (slovo[t] != '\0'); a = t; t = a - 1; netprobelam(slovo); system("pause"); do { prov[i] = slovo[t]; i++; t--; } while (t != -1); t = 0; i = i - 1; do { t++; i--; } while (slovo[t] == prov[i]); if ((t - 1) == a) { cout << "Выполняется\n"; } else { cout << "Не выполняется\n"; } system("pause"); } the problem is that the function does not replace all the letters with the following, but only chops off the word before the first space, I ask for help.