Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. public void printInBinary(int n) {
  2. if (n < 2) {
  3. System.out.print(n);
  4. } else {
  5. printInBinary(n / 2);
  6. System.out.print(n % 2);
  7. }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement