/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { { int[][] matrix = new int[8][8]; int count = matrix[0].length - 1; int xcurr = 0; int ycurr = count; for(int x=0; x < matrix[0].length; x++) { for (int y=0; y < matrix[0].length; y++) { if (x == xcurr && y == ycurr) { matrix[x][y] = count; ycurr --; xcurr ++; count --; } else { matrix[x][y] = 0; } } } for(int i=0; i < matrix.length; i++) { } } }
Standard input is empty
Standard output is empty
[0, 0, 0, 0, 0, 0, 0, 7] [0, 0, 0, 0, 0, 0, 6, 0] [0, 0, 0, 0, 0, 5, 0, 0] [0, 0, 0, 0, 4, 0, 0, 0] [0, 0, 0, 3, 0, 0, 0, 0] [0, 0, 2, 0, 0, 0, 0, 0] [0, 1, 0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 0, 0, 0, 0]