Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <algorithm>
- using namespace std;
- bool isPalindrome(string s) {
- string t = s;
- reverse(t.begin(), t.end());
- return t == s;
- }
- int main()
- {
- string s;
- cin >> s;
- if (isPalindrome(s))
- cout << "Yes";
- else
- cout << "No";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement