Advertisement
Korotkodul

dem21.n2

Jun 7th, 2023
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.96 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3.                               Online C++ Compiler.
  4.                Code, Compile, Run and Debug C++ program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9. #include <iostream>
  10. #include <vector>
  11. using namespace std;
  12.  
  13. bool f(bool x, bool y, bool z, bool w) {
  14.     bool A = x || y;
  15.     bool B = (y != z);
  16.     //bool B = !(y == z)
  17.     bool C = !w;
  18.     return A && B && C;
  19. }
  20.  
  21. int main()
  22. {
  23.     vector <bool> v = {0,1};
  24.     for (bool x: v) {
  25.         for (bool y: v) {
  26.             for (bool z: v) {
  27.                 for (bool w: v) {
  28.                     bool F = f(x,y,z,w);
  29.                     if (F) {
  30.                         cout << x << ' ' << y << ' ' << z << ' ' << w << "\n";
  31.                     }
  32.                 }
  33.             }
  34.         }
  35.     }
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement