Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
302 B
0
Indexable
Never
#include <iostream>

using namespace std;

int main() {
    int a; 
    cin >> a; 
    int temp = a; 
    int b = 0;

    while (temp != 0)
    {
        b = b * 10 + temp % 10; 
        temp /= 10;
    }

    if (a == b)
        cout << "Palindrom";
    else {
        cout << "Ne palindrom";
    }

}
Leave a Comment