Java
3
Вклад в тег
char[][] array = new char[size][size];
char tic = 'x';
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array.length; j++) {
if (j == i || j == array.length - 1 - i)
array[i][j] = tic;
}
}
for (int i = 0; i < array.length; i++) {
for (int j = 0; j < array[i].length; j++) {
System.out.print(array[i][j] + " ");
}
System.out.println();
}