Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int minDigit(int n) {
- if(n/10 == 0)
- return n;
- else
- return Math.min(minDigit(n/10), n%10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement