Question: Name your program palindrome. cpp All strings in the program are implemented as instances of the C++ string class Prompt for the user to enter

Name your program palindrome. cpp All strings in the program are implemented as instances of the C++ string class Prompt for the user to enter a potential palindrome Read the user input in to an instance of the string class (see string I/O for an example) a. The test input will NOT contain punctuation characters (periods, commas, exclamation or question marks), etc. b. The test input will consist of only one case (i.e., it will not contain a mix of upper and lower case letters) c. The test input will contain spaces, which you must remove (see the code fragment below) Test the string to see if it is a palindrome (follow either of the two examples in palnumber.cpp) Write a message to the screen stating that the input was or was not a valid palindrome The program terminates after print the message - no prompts, loops, or pauses Removing Spaces From A String It is probably easiest to first remove all of the spaces from the string before testing it to see if it is a palindrome. The following code fragment (which you may use in your program) will remove the spaces from a string object: for (int i = 0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!