Siema wszystkim zainteresowanym! ;) mam taki oto kod:
program Macierz;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
tab: array[1..10,1..10] of integer;
i,j: integer;
begin
for i:=1 to 10 do
for j:=1 to 10 do
begin
if (j=10-i+1) or (i=j) then tab[i,j] := 0 else tab[i,j] := 2;
if ((j>i) and (j<6)) then tab[i,j] := 5;
if ((j>i) and (i<10-j+1)) then tab[i,j] := 5;
end;
for i:=1 to 10 do
for j:=1 to 10 do
begin
if (j=10-i+1) or (i=j) then tab[i,j] := 0 else tab[i,j] := 2;
if ((i>j) and (i<6)) then tab[i,j] := 3;
if ((i>j) and (i<10-j+1)) then tab[i,j] := 3;
end;
for i:=1 to 10 do
begin
for j:=1 to 10 do
Write(tab[i,j],' ');
Writeln;
end;
Readln;
end.
Czy ktos moglby mi podpowiedziec dlaczego mi znikaja 5-tki???
Z gory dzieki ;)
White Angel