Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. void print_bin(int n)
  2. {
  3. //We assume that the number entered is positive
  4.  
  5. if((n-n%2)/2 > 0)
  6. print_bin((n-n%2)/2);
  7.  
  8. putchar(n%2 + '0');
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement