Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <iostream>
- #include <vector>
- using namespace std;
- bool f(bool x, bool y, bool z, bool w) {
- bool A = x || y;
- bool B = (y != z);
- //bool B = !(y == z)
- bool C = !w;
- return A && B && C;
- }
- int main()
- {
- vector <bool> v = {0,1};
- for (bool x: v) {
- for (bool y: v) {
- for (bool z: v) {
- for (bool w: v) {
- bool F = f(x,y,z,w);
- if (F) {
- cout << x << ' ' << y << ' ' << z << ' ' << w << "\n";
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement