Kód: Vybrať všetko
var x,y,i,j,n,m,o:integer;
begin
x:=0;
y:=175;
N:=1;
for I:= 1 to 8 do
begin
if I mod 2=0 then
image1.canvas.brush.color:=clBlue
else image1.canvas.brush.color:=clRed;
for J:= 1 to N do
begin
image1.canvas.rectangle(x,y,x+25,y+25);
y:=y+25;
x:=x+25
end;
y:=y-(25+(n*25));
x:=x-n*25;
N:=N+1;
end;
y:=0;
x:=25;
N:=7;
image1.canvas.brush.color:=clBlue;
for M:= 1 to 8 do
begin
if M mod 2=0 then
image1.canvas.brush.color:=clBlue
else image1.canvas.brush.color:=clRed;
for O:=1 to N do
begin
image1.canvas.rectangle(x,y,x+25,y+25);
y:=y+25;
x:=x+25;
end;
x:=x+25-n*25;
y:=y-n*25;
n:=n-1;
end;
end;