fork(5) download
  1. #include <iostream>
  2. #include <stdio.h>
  3. using namespace std;
  4. void ConvertToBinary(int n);
  5. int main() {
  6. ConvertToBinary(11);
  7. return 0;
  8. }
  9. void ConvertToBinary(int n)
  10. {
  11. if (n / 2 != 0) {
  12. ConvertToBinary(n / 2);
  13. }
  14. printf("%d", n % 2);
  15. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
1011