1 0 0 ... 0 0 1
1 1 0 ... 0 1 1
1 1 1 ... 1 1 1
. . . . . . .
. . . . . . .
. . . . . . .
1 1 0 ... 0 1 1
1 0 0 ... 0 0 1
program Matritsa;
Var a:array[1..100, 1..100] of Integer;
n,z:integer;
i,j:byte;
Begin
WriteLn('Vvedite razmernost matritsi');
ReadLn(n);
z:=1;
For i:=0 to n do
begin
For j:=1 to n do
begin
if ((j<=z) or (j>=n-z)) then
a[i,j]:=1 else a[i,j]:=0;
end;
if ((i<n/2)) then
z:=z+1
else
z:=z-1
end;
WriteLn;
WriteLn('Rezultat:');
for i:=0 to n do
Begin for j:=1 to n do Write (a[i,j],' ');
WriteLn;
end;
ReadLn
end.