How to print reverse of a number