Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
reverse integer
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int num=123456; rev=0; while(num!=0) { rev =rev*10+num%10; num=num/10; } system.out.println("reverse integer is" +rev); } }
run
|
edit
|
history
|
help
0
patterns
Sort arraylist bubble sort
1.5
th
classwork
Assignment for Web Software Developer position
Java Object Graph Dumper (iterative)
Display Page (Pagination)
Queue implementation
Day