Skip to content

Instantly share code, notes, and snippets.

@arrbxr
Created February 19, 2018 21:07
Show Gist options
  • Select an option

  • Save arrbxr/181df689377bcef7fffb74a7b8a04b27 to your computer and use it in GitHub Desktop.

Select an option

Save arrbxr/181df689377bcef7fffb74a7b8a04b27 to your computer and use it in GitHub Desktop.
reverse number created by arrbxr - https://repl.it/@arrbxr/reverse-number
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