Created
February 19, 2018 21:07
-
-
Save arrbxr/181df689377bcef7fffb74a7b8a04b27 to your computer and use it in GitHub Desktop.
reverse number created by arrbxr - https://repl.it/@arrbxr/reverse-number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Main { | |
| public static void main(String[] args) { | |
| int num = 1234888, temp , i, reverse = 0; | |
| temp = num; | |
| while(num > 0){ | |
| reverse = reverse*10 + num % 10; | |
| num /= 10; | |
| } | |
| System.out.println(reverse); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment