Advertisement
Josif_tepe

Untitled

Jun 12th, 2022
668
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None
  1. #include <iostream>
  2. #include <vector>
  3. #include <cstring>
  4. #include <algorithm>
  5. #include <stack>
  6. using namespace std;
  7.  
  8. int main() {
  9.     int x = 32;
  10.     for(int bit = 6; bit >= 0; bit--) {
  11.         if(x & (1 << bit)) {
  12.             cout << 1;
  13.         }
  14.         else {
  15.             cout << 0;
  16.         }
  17.     }
  18.     cout << endl;
  19.     return 0;
  20. }
  21.  
Advertisement
RAW Paste Data Copied
Advertisement