whiplk

[CODE] - binParse

Oct 19th, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.16 KB | None | 0 0
  1. //Enviado por Willian Luigi
  2.  
  3. public static String binParse(int n) {
  4.     int r = n % 2, c = n / 2;
  5.     if (n == 1) return 1 + "";
  6.     return binParse( c ) + r + "";
  7. }
Advertisement
Add Comment
Please, Sign In to add comment