algorithm'''problem solve

[백준]1259-팰린드롬수(설명X)

JunHwa Park 2020. 4. 8. 15:56
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
 
int main() {
    string str;
    cin >> str;
    while (str.compare("0")) {
        string clone;
        clone += str;
        reverse(clone.begin(), clone.end());
        if (!str.compare(clone.c_str()))
            cout << "yes" << endl;
        else
            cout << "no" << endl;
        cin >> str;
    }
}
cs