fork(1) download
  1. #include <iostream>
  2. #include <bitset>
  3. using namespace std;
  4.  
  5. void binary(int a)
  6. {
  7. cout << bitset<8>(a).to_string() << endl;
  8. }
  9.  
  10. int main()
  11. {
  12.  
  13. binary(16);
  14.  
  15. system("pause");
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 3016KB
stdin
Standard input is empty
stdout
00010000