i am trying to take input from the using in a 2d char array where the output should be like :
110
1_0
11_
_11
0__
this can have as many combinations as 2^n where n is also user input. how can i create this output?
public static void main (String args[])
{ Scanner sc = new Scanner(System.in);
System.out.println("Enter Value i: ");
int i = sc.nextInt();
int j =(int) Math.pow(2,i);
char[][]array = new char[i][j];
for (int k=0;k<i;k++)
for (int s=0;s<j;s++)
{ array[k][s]= ?; //i am stuck here
}