Answers for "palindrome cpp string"

C++
0

palindrome cpp string

string input;

cout << "Please enter a string: ";
cin >> input;

if (input == string(input.rbegin(), input.rend())) {
    cout << input << " is a palindrome";
}
Posted by: Guest on June-10-2021

Browse Popular Code Answers by Language