Question: You are to write a function named is_palindrome() with return type bool that is able to detect whether a perfectly general string parameter, including the
You are to write a function named is_palindrome() with return type bool that is able to detect whether a perfectly general string parameter, including the string representation of any number, is a palindrome. If the input is an actual numeric expression, such as an int or a double, it is first converted to a string using the overloaded function to_string. Finally write a menu-driven program that optionally prompts the user for an integer, double, or string and then converts the input to a target string if necessary, and finally calls the is_palindrome function and reports the result, whether the input was a palindrome or not. Put the whole program in a sentinel controlled while loop so that the user can try as many inputs as they desire in one program session.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
