/media/sda-magnetic/david/Extern-Magnetic-2022-06-29/Extern01/Dokumente-11-2021-07-05/informatik-math/informatik2/2021-04-24-state/aufg-solve.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, (x and z0) or ((not x) and z1) or ((not x) and z2), ((not x) and z0) or (x and z1), x and z2, z0 or ((not x) and z1) or z2);
                    }
                }
            }
        }
return 0;
}