Question
C++ THE NOHL PALINDROME A palindrome is a word or phrase that reads the same forward and backward. Examples of such palindromes are: radar, Poor
C++
THE NOHL PALINDROME
A palindrome is a word or phrase that reads the same forward and backward. Examples of such palindromes are: radar, Poor Dan is in a droop., A man, a plan, a canal, Panama., and a Toyota.
A Nohl palindrome is a palindrome of at least three characters in length embedded in a word, which itself is not a palindrome. Examples of words that are Nohl palindromes are: Mississippi, banana, robot, and institution. The embedded palindrome is in bold. Examples of words that are not Nohl palindromes are: radar, roof, table, and committee.
The order of a Nohl palindrome is the length of the palindrome substring.
Your task is to accept words on input and indicate whether or not the word is a Palindrome, a Nohl palindrome, or neither. If it is a Nohl palindrome, you will further output the palindromic substring and its order. You must locate and output the Nohl palindrome with the largest order. See the examples below.
You must use functions to handle some of the chores, such as detecting Palindromes or Nohl Palindromes.
You may use any data structures you like. Hint: using char arrays might made the task easy.Complete all the tasks indicated, using functions, the data structure of your choice, commented & readable code, and a solid programming algorithm.
comments should be meaningful and based on routines
Sample run
Enter word: mississippi
mississippi is NOT a Palindrome
mississippi is a Nohl Palindrome
Nohl string is ississi
The order is 7
Enter word or *** to quit: tobacco
tobacco is NOT a Palindrome
tobacco is NOT a Nohl Palindrome
Enter word or *** to quit: deed
deed is a Palindrome
Enter word or *** to quit: robot
robot is NOT a Palindrome
robot is a Nohl Palindrome
Nohl string is obo
The order is 3
Enter word or *** to quit: ***
Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started