Untitled
unknown
plain_text
2 years ago
302 B
5
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