1
2
3
4
5
6
7
8
9
10
bool isrever(int n)
{
int tmp = n, NEW = 0;
while (tmp)
{
NEW = NEW * 10 + tmp % 10;
tmp /= 10;
}
return NEW == n;
}