public static void Main(string[] args)
Console.WriteLine("Enter a string to check if it's a palindrome:");
string input = Console.ReadLine();
Console.WriteLine("The entered string is a palindrome.");
Console.WriteLine("The entered string is not a palindrome.");
static bool IsPalindrome(string str)
int right = str.Length - 1;
while (!char.IsLetterOrDigit(str[left]) && left < right)
while (!char.IsLetterOrDigit(str[right]) && left < right)
if (str[left] != str[right])