69 799
Assignments Done
Successfully Done
In February 2019

Answer to Question #55035 in C++ for paul

Question #55035
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)
Expert's answer
#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";
cout << text << " is not a palindrome\n";
return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions