Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
uraian angka
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int x = 1225461; rekursif(x); } public static void rekursif(int x) { if(x > 0){ int length = String.valueOf(x).length(); int min = (int) Math.pow(10,length-1); int firstNum = x/(min); firstNum = firstNum * (min); System.out.println(firstNum); rekursif(x-firstNum); } } }
run
|
edit
|
history
|
help
0
Coding For Fandroid
jb15.0
Consecutive Elements String
pow binary
Neeraj
LRU cache - Simple solution (costly)
Factorial using recursion in java
BFS in graph
right swastik
switching light bulbs