Please help me regarding C++ About Array (Palindrome)

Hi I badly need your help im having a trouble creating this program this is the problem:

Input:
One or more words that may contain all possible characters – alphabet, number, space or any special
character.
Output:
Begin the program display with the message: “Enter word or enter 'Q' to quit.”
Mark the beginning of every input with “>> ”.
After each entry, there may be three possible outputs:
• Display “PALINDROME” if the word entered, disregarding cases, spaces and special
characters, is a palindrome.
• Display “NOT PALINDROME” if the word entered, disregarding cases, spaces and special
characters, is not a palindrome.
• Display “OOPS! Enter a word with at least two alphabetical/numeric characters” if the word
entered, disregarding cases, spaces and special characters, is less than two characters.
End the program if user entered the letter ‘Q’ regardless of the case and whether it has additional space or
special characters. (See next page for sample output and format.)

Please help me. Im a newbie at programming XD
Last edited on
Even if you are new, you must have got some material before this homework. Study it.

The purpose of homework is that you do learn (by doing).

Show the code that you have written so far.
So far this is the code that ive written.

//main
do{
cout << “Enter word or enter 'Q' to quit.”
cin >> input;
while(Q != "Q"){
IF (input of the user palindrome)
cout << "PALINDROME";
else if (input of the user different)
cout << "NOT A PALINDROME";
else if (input.length() <= 2 )
cout << "OOPS! Enter a word with at least two alphabetical/numeric characters.";
Last edited on
Topic archived. No new replies allowed.