#define _CRT_SECURE_NO_WARNINGS #include #include #include int main() { char text[31]; char check[31] = { NULL }; int length; bool isPalindrome = true; scanf("%[^\n]s", text); length = strlen(text); char* ptr = strtok(text, " "); while (ptr != NULL) { strcat(check, ptr); ptr=strtok(NULL, " "); } for (int i = 0; i < length / 2; i++) { if (text[i] != text[length - 1 - i]) { isPalindrome = false; break; } } printf("%d", isPalindrome); return 0; }