Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- int l;
- bool flag=1;
- string s;
- cin>>s;
- l = s.size();
- for (int i = 0,j= l-1; i < l/2; i++,j--) {
- if (s[i] != s[j])
- flag = 0;
- }
- if (flag) cout << "yes";
- else cout << "no";
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement