Atbildes
-
0 0
jungle (34) 4 (1271)23 13 g
uses crt;
const num=10;
var mas : array [1..num,1..num] of integer;
i, j, counter : integer;
begin
clrscr;
counter:=1;
{aizpildam visu masivu ar vertibam 0}
for i:=1 to 10 do
for j:=1 to 10 do
mas[i,j]:=0;
{masiva aizpildisa ar vertibam 1,2,3...}
for j:=3 to 4 do
for i:= 8-j to 3+j do
begin
mas[i,j]:=counter;
counter:=counter+1;
end;
for j:= 5 to 6 do
for i:= 3 to 8 do
if (( i<>5) and (i<>6)) then
begin
mas[i,j]:=counter;
counter:=counter+1;
end;
for j:= 7 to 8 do
for i:= j-3 to 14-j do
begin
mas[i,j]:=counter;
counter:=counter+1;
end;
{izvadam masivu}
for i:=1 to 10 do
for j:=1 to 10 do
begin
if (j mod 10 = 0) then
writeln(mas[i,j]:4)
else
write(mas[i,j]:4);
end;
readln;
end.