Двумерный массив!Решение вTurbo Pascal!
Const n = 10; var a: array[1..n, 1..n] of integer; i, j: integer; begin for i := 1 to n do begin for j := 1 to n do begin if (i = j) or (i + j = n + 1) then a[i, j] := 0 else a[i, j] := 1; write(a[i, j], ' ') end; writeln; end; end.