Advertisement
Josif_tepe

Untitled

Jun 12th, 2022
827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement