To reverse a number