/media/sda-magnetic/david/Extern-Magnetic-2022-06-29/Extern01/Dokumente-11-2021-07-05/informatik-math/informatik2/2021-04-24-state/solver.c


#include <stdio.h>

#define and &&
#define or ||
#define not !

int main (void) {
        int x, z2, z1, z0;
        
        for (z2 = 0;  z2 <= 1;  z2++) {
            for (z1 = 0;  z1 <= 1;  z1++) {
                for (z0 = 0;  z0 <= 1;  z0++) {
                    for (x = 0;  x <= 1;  x++) {
                        
                            printf ("%i %i %i %i   %i %i %i %i\n", z2, z1, z0, x, (not z2 and not z1 and not z0) or (z2 and z1 and not z0) or (z2 and z1 and not x),  (not z0) or (not z2 and z1 and x) or (z2 and z1 and not x) or (z2 and not z1 and x), (not z1 and not x) or (not z2 and not z1) or (z2 and z1 and x) or (not z2 and not z0 and not x) or (z2 and z0), (not z2 and z1 and not z0 and not x) or (not z2 and not z1 and x) or (z2 and not z1 and not x) or (z2 and z1 and x) or (z0 and x) or (z2 and z0));
                    }
                }
            }
        }
return 0;
}