fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. void bin(unsigned n)
  5. {
  6. /* step 1 */
  7. if (n > 1)
  8. bin(n / 2);
  9.  
  10. /* step 2 */
  11. cout << n % 2;
  12. }
  13.  
  14. // Driver Code
  15. int main(void)
  16. {
  17. bin( 200000);
  18. cout << endl;
  19.  
  20. }
Success #stdin #stdout 0s 5656KB
stdin
Standard input is empty
stdout
110000110101000000