Reversing a Number
long reversedNum = 0; while (input_long != 0) { reversedNum = reversedNum * 10 + input_long % 10; input_long = input_long / 10; }