write a program that reads a line of text ,changes each uppercase letter to lowercase ,and places each letter both in a queue and onto a stack .The program should then verify whether the line of text is apalindrome (a set of letter or numbers that is the same whether read forward or backward)
1
Expert's answer
2015-09-29T05:21:01-0400
#include <iostream> #include <string> #include <algorithm> using namespace std;
int main() { std::string text; cout << "Please, enter string:\n"; getline(std::cin, text); std::transform(text.begin(), text.end(), text.begin(), ::tolower); cout << text << endl; if (text == string(text.rbegin(), text.rend())) cout << text << " is a palindrome\n"; else cout << text << " is not a palindrome\n"; system("pause"); return 0; }
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment