#include <iostream>
#include <string>
#include <algorithm> // برای استفاده از reverse()
using namespace std;
int main() {
string str;
// دریافت رشته از کاربر
cout << "Enter a string: ";
getline(cin, str);
// ایجاد یک کپی از رشته و معکوس کردن آن
string reversedStr = str;
reverse(reversedStr.begin(), reversedStr.end());
// مقایسه رشته اصلی با معکوس آن
if (str == reversedStr) {
cout << "The string is a palindrome." << endl;
} else {
cout << "The string is not a palindrome." << endl;
}
return 0;
}