indzi
11/18/2017 - 12:14 PM

Reversing a Number

Reversing a Number

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