Exioms interview question

WAP for Reverse number