fork(80) download
  1. #include <stdio.h>
  2.  
  3. void print_binary(int number)
  4. {
  5. if (number) {
  6. print_binary(number >> 1);
  7. putc((number & 1) ? '1' : '0', stdout);
  8. }
  9. }
  10.  
  11. int main(void) {
  12. print_binary(42);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
101010