Advertisement
DarkoreXOR

Untitled

Jul 17th, 2020
1,042
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5.     for (int iteration = 1; iteration <= 31; iteration++)
  6.     {
  7.         for (int eax = 0; eax <= 16; eax++)
  8.         {
  9.             int and_result = eax & iteration; // and eax, iteration
  10.             int mod_result = eax % (iteration + 1);
  11.  
  12.             std::cout << "[" << iteration << "] result: " << (and_result == mod_result) << std::endl;
  13.         }
  14.  
  15.         std::cout << std::endl;
  16.     }
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement