A palindrome is a string that reads the same backwards and forwards. Use a deque to implement a program that tests whether a line of text is a palindrome. The program reads a line, then outputs whether the input is a palindrome or not.
Ex: If the input is:
senile felines!
the output is:
Yes, "senile felines!" is a palindrome.
Ex: If the input is:
rotostor
the output is:
No, "rotostor" is not a palindrome.
Ignore any character that is not a letter. Assume all alphabetic characters will be lowercase.
Use this as a template for your file. Full documentation is required.
#include <iostream> #include <deque> #include <string> using namespace std; int main() { string line; bool result; /* Type your code here. */ }