This program prints reverse of a number i.e. if the input is 951 then output will be 159.
Java programming source code
Download Reverse number program class file.
Output of program:
You can also reverse or invert a number using recursion. You can use this code to check if a number is palindrome or not, if the reverse of an integer is equal to integer then it's a palindrome number else not.
No comments:
Post a Comment