uses graphABC;
procedure trg(x,y,a:integer);
begin
setpencolor(clGreen);
line(x-a,y,x+a,y);
line(x-a,y,x,y-a);
line(x,y-a,x+a,y);
floodfill(x,y-a+1,clGreen);
end;
var x,y,a,i:integer;
x:=windowwidth div 2;
y:=windowheight-120;
a:=100;
for i:=1 to 6 do
trg(x,y,a);
y:=y-2*a div 3;
a:=a-20;
setpencolor(clBrown);
setbrushcolor(clBrown);
rectangle(x-20,windowheight-120,x+20,windowheight-70)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
uses graphABC;
procedure trg(x,y,a:integer);
begin
setpencolor(clGreen);
line(x-a,y,x+a,y);
line(x-a,y,x,y-a);
line(x,y-a,x+a,y);
floodfill(x,y-a+1,clGreen);
end;
var x,y,a,i:integer;
begin
x:=windowwidth div 2;
y:=windowheight-120;
a:=100;
for i:=1 to 6 do
begin
trg(x,y,a);
y:=y-2*a div 3;
a:=a-20;
end;
setpencolor(clBrown);
setbrushcolor(clBrown);
rectangle(x-20,windowheight-120,x+20,windowheight-70)
end.