Advertisement
_MuradPro_

minDigit

Jun 14th, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.12 KB | None | 0 0
  1. public static int minDigit(int n) {
  2.         if(n/10 == 0)
  3.             return n;
  4.         else
  5.             return Math.min(minDigit(n/10), n%10);
  6.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement