uses GraphABC; var i: integer; arr: array [1..6] of color; begin arr[1] := clPink; arr[2] := clRed; arr[3] := clGreen; arr[4] := clBlue; arr[5] := clYellow; arr[6] := clOrange; for i := 0 to 59 do begin SetBrushColor(arr[random(6) + 1]); FillRectangle((i mod 16) * 40, (i div 16) * 20, (i mod 16) * 40 + 39, (i div 16) * 20 + 19); sleep(20); end; end.
GraphABC;
var
i: integer;
arr: array [1..6] of color;
begin
arr[1] := clPink; arr[2] := clRed; arr[3] := clGreen;
arr[4] := clBlue; arr[5] := clYellow; arr[6] := clOrange;
for i := 0 to 59 do
begin
SetBrushColor(arr[random(6) + 1]);
FillRectangle((i mod 16) * 40, (i div 16) * 20, (i mod 16) * 40 + 39, (i div 16) * 20 + 19);
sleep(20);
end;
end.