fork(1) download
  1. #include <stdio.h>
  2.  
  3. long binario(int num) {
  4. if (num == 0)
  5. return 0;
  6. return (num % 2) + 10 * binario(num / 2);
  7. }
  8.  
  9. int main() {
  10. printf("%ld", binario(1025));
  11. }
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
10000000001