program shet;
uses crt;
var n, i, j: integer;
mas : array [1..100, 1..100] of integer;
begin
writeln('Enter n');
readln(n);
if (n > 100) then writeln('wrong number');
for i:=1 to n do
for j:=1 to n do
if (n = i+j - 1) then mas[i, j]:=1
else if(j>n-i+1) then mas[i, j]:=2
else mas[i, j]:=0;
end;
write(mas[i,j], ' ' );
writeln();
end
end.
program shet;
uses crt;
var n, i, j: integer;
mas : array [1..100, 1..100] of integer;
begin
writeln('Enter n');
readln(n);
if (n > 100) then writeln('wrong number');
for i:=1 to n do
for j:=1 to n do
begin
if (n = i+j - 1) then mas[i, j]:=1
else if(j>n-i+1) then mas[i, j]:=2
else mas[i, j]:=0;
end;
for i:=1 to n do
begin
for j:=1 to n do
begin
write(mas[i,j], ' ' );
end;
writeln();
end
end.