Question: Palindrome in C++ Modify the program so it takes a WORD and a PHRASE and returns the correct feedback. You entered a WORD or you
Palindrome in C++
Modify the program so it takes a WORD and a PHRASE and returns the correct feedback. You entered a WORD or you ENTERED a PHRASE.
#include
// Function prototype bool isPalindrome(string);
int main() { const int SIZE = 6;
// Create an array of strings to test. string testStrings[SIZE] = { "ABLE WAS I ERE I SAW ELBA", "FOUR SCORE AND SEVEN YEARS AGO", "NOW IS THE TIME FOR ALL GOOD MEN", "DESSERTS I STRESSED", "AKS NOT WHAT YOUR COUNTRY CAN DO FOR YOU", "KAYAK" }; // Test the strings. for (int i = 0; i
//******************************************* // The isPalindrome function returns true * // the argument is a palindrome, false * // otherwise. * //*******************************************
bool isPalindrome(string str) { bool status = false;
if (str.length()
return status; }

Assignment 2 - C++ Palindrome Description The challenge for this second assignment is to develop a program, called palindrome.cpp, capable of detecting palindromes. A palindrome is a word, phrase, or sequence that reads the same backward as forward. Your program should take input from stdin and determine whether the characters formulate a palindrome Requirements The following functions should be defined: bool isPalindrome (string text) Example $/palindrome Enter Text: bob The word "bob" is a palindrome. Enter Text: A car, a man,a maraca The phrase "A car, a man, a maraca" is a palindrome. Enter Text: slow The word "slow" is not a palindrome. Enter Text: quit Due: January 29th, 2017 11:59 PM
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
