Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need the answer very quickly HW3-A - Check whether a String is Palindrome or not (Chapter 4 and 5, or Chapter 7) Collapse context

i need the answer very quickly

HW3-A - Check whether a String is Palindrome or not (Chapter 4 and 5, or Chapter 7)

Collapse context

Write a C++ Program to check whether a string is a palindrome or not. A palindrome is a word, verse, or sentence (such as " I ere I saw Elba") that reads the same backward or forward.

In this task, the inserted string should consist of letters only (A to Z and a to z). In case of an invalid character is inserted, the output will be the phrase "Wrong entry". If the iserted string is palindrome, the output will be the word "Palindrome", else it will be "NOT Palindrome". The inserted string is case insensitive.

IMPORTANT NOTE

  • Do not add any cout statements except for the final answer as specified above.
  • Do not add "Enter a number", "the number of digits is" or any similar prompts.
  • Also note that the automatic grader is case-sensitive; so "palindrome" is wrong but "Palindrome" is right.
  • Do not add any unnecessary spaces inside the strings of cout statements " ".
  • You may add any libraries needed.

I/O

Program Input:

  • A string consists of letters only

Program Output:

  • A phrase that shows that the entry is wrong "Wrong entry" , the string is palindrome "Palindrome", or not "NOT Palindrome".
  • #include #include

    using namespace std;

    int main() {

    return 0;

    }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions