Question: Using C++ Write a function, isPalindrome, that accepts a string and determines if the string is a palindrome. It would look like this: void isPalindrome(string):
Write a function, isPalindrome, that accepts a string and determines if the string is a palindrome. It would look like this: void isPalindrome(string): A palindrome is any word, phrase, or sentence that reads the same forward and backward. This function must use recursion to solve this problem. The function must accept a string argument that may be a single word or an entire phrase. Spaces and numbers must be considered by the function. This means that "kayak is not a palindrome because of the extra space at the end, while "kayak"IS a palindrome Next, write a driver that prompts the user for a string, and tells the user if the string is or is not a palindrome by passing the string to your function. The output should look like this: ***Notice the space after kayak.*** Enter a string to test: kayak The string 'kayak' is not a palindrome. Enter a string to test: kayyak The string 'kayyak is a palindrome. Enter a string to test: kayak The string 'kayak' is a palindrome. Enter a string to test: this is a si siht The string 'this is a si siht' is a palindrome
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
