fork(15) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int nibble(int val, int k) {
  5. return (val >> (4*k)) & 0x0F;
  6. }
  7.  
  8. int main() {
  9. int val = 1265985549;
  10. for (int k = 0; k != 8 ; k++) {
  11. int n = nibble(val, k);
  12. cout << n << endl;
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
13
0
8
6
5
7
11
4