Problem: Palindrome Check

Write a C++ program that checks whether a given string is a palindrome or not. A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward, disregarding spaces, punctuation, and capitalization.

Your program should take an input string from the user and output whether it is a palindrome or not.

Example:

Enter a string: radar
radar is a palindrome.

Enter a string: Hello
Hello is not a palindrome.

Hint: To check if a string is a palindrome, you can compare the characters from the beginning and end of the string, moving towards the center. If all the characters match, then the string is a palindrome.

You can start by writing the basic structure of the program and then gradually complete it. Let me know if you need further assistance!

#include <iostream>
#include <vector>
#include<string>
#include <algorithm>

using namespace std;

int main() {
	string word;
	
	
	cout << "Enter a string: "; 
	getline(cin, word); 
	string reversed = word;
	reverse(reversed.begin(), reversed.end());
	if(word == reversed){
		cout << word << " is a palindrome";
	}else{
		cout << word << " is not a palindrome";
	}

	

    
}