int ReversNum(int num) { if(num % 10 == num) return num; int tenP = 10; while(num % (tenP*10) != num) tenP *= 10; return rReversNum( num / 10) + (num % 10)*tenP; }