Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void printInBinary(int n) {
- if (n < 2) {
- System.out.print(n);
- } else {
- printInBinary(n / 2);
- System.out.print(n % 2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement