I have the following homework assignment:
I need to create a program that recursively tests in a word or phrase is a palindrome. Here is the prompt:
A palindrome is "a word, line, verse, number, sentence, etc., reading the same backward as forward, as Madam, I'm Adam or Poor Dan is in a droop." (dictionary.com) When evaluating palindromes it is customary to ignore spaces and punctuation. You will write a program which uses recursion to determine whether a String contains a palindrome.
Your program should do the following:
- Prompt the user to enter a string.
- Use recursion to remove all non-letters from the string.
- Change the string to lower case
- Use recursion to test whether the string is a palindrome.
I am stuck on where to start with it. Can you suggest a starting point?
Any help on this would be greatly appreciated!