Question: Write a program that allows the user to enter a word or phrase and determines whether the word or phrase is a palindrome. A palindrome


Write a program that allows the user to enter a word or phrase and determines whether the word or phrase is a palindrome. A palindrome is a word or phrase that reads the same backwards as forwards. Examples include: civic, kayak, mom, noon, racecar, Never odd or even., and Was it a Rat I saw? Your program must include a function that takes a string as its only argument and returns a copy of the string minus all non-letters and a function named isPalindrome that retuns true when the string that is its only argument is a palindrome, and false otherwise. The program should display the original string as input with a message indicating whether it is or is not a palindrome. Please take careful note that only material discussed in Chapters 1-6 of the text and lectures may be used in this assignment. This does not include string functions other than length and at. We have talked about the concatenation operator which can be used to construct a new string from the characters of two string operands or a string and a character operand. Using the toupper and tolower functions prototyped in the cctype header file is also allowed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
