03. A palingram is a phrase/sentence in which the letters or words read the same backward as they do forward. A phrase/sentence is a letter palingram if the sequence order of the letters (disregard the letter case) is the same when it reads backward as it reads forward disregarding the spaces and punctuations. While the word palingram, the sequence order of the words in the phrase/sentence (disregard the letter case of the letters) is the same when it reads backward as it reads forward disregarding the punctuations only. An example of letter palingram is "Able was I ere I saw Elba", purportedly spoken by Napoleon, referring to his first sighting of Elba, the island where the British exiled him. An example of word palingram is "He was, was he?". The sentence, "I did, did I?" is not only a word palingram but a letter palingram as well. Write a program will tell if the inputted phrase/sentence of the user is a palingram (letter and/or word) or not. Sample run: PALINGRAM IDENTIFIER >> Enter a phrase/sentence: Able was I ere I saw Elba! A PALINGRAM (Letter Palingram) >> Enter 'Y' to try again: y >> Enter a phrase/sentence: He was, was he? -- A PALINGRAM (Word Palingram) >> Enter 'Y' to try again: y >> Enter a phrase/sentence: He was, was he? -- A PALINGRAM (Letter & Word Palingram) >> Enter 'Y' to try again: y >> Enter a phrase/sentence: Hello, how are you? -- NOT A PALINGRAM >> Enter 'Y' to try again: x Program Terminated

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter15: Recursion
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question
03. A palingram is a phrase/sentence in which the letters or words read the same.
backward as they do forward. A phrase/sentence is a letter palingram if the
sequence order of the letters (disregard the letter case) is the same when it.
reads backward as it reads forward disregarding the spaces and punctuations.
While the word palingram, the sequence order of the words in the
phrase/sentence (disregard the letter case of the letters) is the same when it
reads backward as it reads forward disregarding the punctuations only. An
example of letter palingram is "Able was I ere I saw Elba", purportedly spoken
by Napoleon, referring to his first sighting of Elba, the island where the
British exiled him. An example of word palingram is "He was, was he?". The
sentence, "I did, did I?" is not only a word palingram but a letter palingram
as well.
Write a program will tell if the inputted phrase/sentence of the user is a
palingram (letter and/or word) or not.
Sample run:
PALINGRAM IDENTIFIER
>> Enter a phrase/sentence: Able was I ere I saw Elba!
A PALINGRAM (Letter Palingram)
>> Enter 'Y' to try again: y
>> Enter a phrase/sentence: He was, was he?
-- A PALINGRAM (Word Palingram)
>> Enter 'Y' to try again: y
>> Enter a phrase/sentence: He was, was he?
-- A PALINGRAM (Letter & Word Palingram)
>> Enter 'Y' to try again: y
>> Enter a phrase/sentence: Hello, how are you?
- NOT A PALINGRAM
>> Enter 'Y' to try again: x
Program Terminated
Transcribed Image Text:03. A palingram is a phrase/sentence in which the letters or words read the same. backward as they do forward. A phrase/sentence is a letter palingram if the sequence order of the letters (disregard the letter case) is the same when it. reads backward as it reads forward disregarding the spaces and punctuations. While the word palingram, the sequence order of the words in the phrase/sentence (disregard the letter case of the letters) is the same when it reads backward as it reads forward disregarding the punctuations only. An example of letter palingram is "Able was I ere I saw Elba", purportedly spoken by Napoleon, referring to his first sighting of Elba, the island where the British exiled him. An example of word palingram is "He was, was he?". The sentence, "I did, did I?" is not only a word palingram but a letter palingram as well. Write a program will tell if the inputted phrase/sentence of the user is a palingram (letter and/or word) or not. Sample run: PALINGRAM IDENTIFIER >> Enter a phrase/sentence: Able was I ere I saw Elba! A PALINGRAM (Letter Palingram) >> Enter 'Y' to try again: y >> Enter a phrase/sentence: He was, was he? -- A PALINGRAM (Word Palingram) >> Enter 'Y' to try again: y >> Enter a phrase/sentence: He was, was he? -- A PALINGRAM (Letter & Word Palingram) >> Enter 'Y' to try again: y >> Enter a phrase/sentence: Hello, how are you? - NOT A PALINGRAM >> Enter 'Y' to try again: x Program Terminated
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Lists
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage