Given N number display M*M format [closed]

You still haven’t asked any question, but I assume that your program gives wrong answer (as it really do) and you don’t know why. For example: for n=16 it prints: 1234 1234 1234 1234 The following code fragment is responsible: array[i][j]=j+1; System.out.print(array[i][j]); Firstly, you don’t print spaces, so numbers aren’t separated. Secondly, you have to … Read more