I have this situation that I need to let users define decisions based on the number of given conditions. For example my program needs to automatically generate a matrix as b
As djna has mentioned in his/hers answer, you are missing the output for the decision.
For instance, if you have a operator that takes two inputs (for example: and, or operators) you have to try it for all possible inputs. For a simple operator that is quite simple since there are only four possible inputs, but for more complex operators you will have to generate 2^n possible inputs to calculate all possible outputs.
I suggest doing this in a array of n boolean variables, where you flip bits to get 2^n possible inputs, then testing your operator with the generated input array and printing the result.
One simple way of generating the array is to create a loop in which you increment a variable from 0 to 2^n - 1 and then converting the number to binary. You will get something like this: (for n = 3):
0: 0 0 0
1: 0 0 1
2: 0 1 0
3: 0 1 1
4: 1 0 0
5: 1 0 1
6: 1 1 0
7: 1 1 1
Hope this helps!