![]() |
How to write a computer program so that any string that you will enter the computer will decide whether it is a palindrome or not? |
[Edit]
Answer
A palindrome is a word (or phrase that reads forwards and backwards the same.
So:
Get the first string - PhraseString
Go through and remove all spaces, just have the letters
Copy this to another string - TestString
TestString will be the same as PhraseString
Reverse the order of the characters in TestString
If TestString is still the same as PhraseString, it's a palindrome!
First answer by Fizzy Wilber. Last edit by Fizzy Wilber. Contributor trust: 65 [recommend contributor]. Question popularity: 16 [recommend question]




