fork(1) download
  1. #include <iostream>
  2. #include <bitset>
  3. using namespace std;
  4.  
  5. int main() {
  6. int angka;
  7. cout << "10: ";
  8. cin >> angka;
  9. cout << "1010: " << bitset<8>(angka);
  10. return 0;
  11. }
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
10: 1010: 01010111