Program p1; var a:array[1..7,1..7] of byte; i,j:byte; begin for i:=1 to 7 do begin for j:=1 to 7 do begin if i<=4 then if (j>=i) and (j<=8-i) then a[i,j]:=1 else a[i,j]:=0 else if (j<=i) and (j>=8-i) then a[i,j]:=1 else a[i,j]:=0; Write(a[i,j]:2) end; Writeln end end.
program p2; var a:array[1..6,1..6] of byte; i,j:byte; begin for i:=1 to 6 do begin for j:=1 to 6 do begin a[i,j]:=i+j-1; if a[i,j]>6 then a[i,j]:=a[i,j]-6; Write(a[i,j]:2) end; Writeln end end.