fork(1) download
  1. #include <iostream>
  2. #include <stdio.h>
  3. using namespace std;
  4. void ConvertToBinary(int n);
  5. int main() {
  6. ConvertToBinary(16);
  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 5288KB
stdin
Standard input is empty
stdout
10000