I\'m trying to print some truth tables as part of a school assignment. How can I generate a dynamic size truth table in Java?
So that printTruthTable(1)
printTruthTable(1)
the truth table is base on the binary representation of the number but without removing leading zero's so what you would do is to loop from 0 to (1<
public void generate(int n){ for (int i=0 ;i!=(1<
you can make that using recursion also :
public void generateRecursively(int i , int n){ if(i==(1<