Untitled

Anonymous
plain_text
11/23/2023 6:32 AM
404 B
11
Indexable
#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";
    }

}
Editor is loading...
Leave a Comment