#include <iostream> 
#include <cstring>

using namespace std ; 

int main() 
{ 
	char word1[20], word2[20], choice = 'y' ; 
	
	do {
		cout << "Please enter a word to check: " ; 
		cin >> word1 ; 
		
		int i = strlen(word1) ; 
		int j = 0 ; 
		
		while (i>= 0) { 
			word2[j] = word1[i] ; 
			cout << word2 << endl; 
			i--; 
			j++ ; 
		}
		
		cout << word1 << " = " << word2 << endl ; 
		
		if (strcmp(word1, word2) == 0)
			cout << word1 << " is a Palindrome word." << endl; 
			
		else 
			cout << word1 << " is not a Palindrome word." << endl ; 
			
			cout << "Do you wish to continue? (y/n)" ; 
			cin >> choice ; 
			cout << endl ; 
			
	} while (choice != 'n' && choice != 'N') ; 

	return 0 ;
}
