How to check if a variable is a Palindrome

What is a Palindrome?
Google defines a Palindrome as:

  1. a word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run.

I was recently asked to write a program that checks whether a particular variable is a palindrome or not.

Below is a little console app that displays where the variable is a palindrome:

Leave a Reply

Your email address will not be published. Required fields are marked *