Uses GraphABC; var i, k: integer; arr: array [1..6] of color; begin writeln('Сколько кирпичиков?'); readln(k); arr[1] := clPink; arr[2] := clRed; arr[3] := clGreen; arr[4] := clBlue; arr[5] := clYellow; arr[6] := clOrange; for i := 0 to k - 1 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, k: integer;
arr: array [1..6] of color;
begin
writeln('Сколько кирпичиков?');
readln(k);
arr[1] := clPink; arr[2] := clRed; arr[3] := clGreen;
arr[4] := clBlue; arr[5] := clYellow; arr[6] := clOrange;
for i := 0 to k - 1 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.
Стена из кирпичиков - норм?)