{ (c) 1998 CREEQ <creeq@web.de> }
program Baum;
uses Crt;
var x, y : byte;

procedure dreieck(y,v,b:byte);
var x, k, i : byte;
begin
  x := 40-(v DIV 2);
  k := v;
  repeat
    gotoxy(x,y);
    for i := 1 to k do
    begin
      textcolor(random(15)+1);
      write('*');
    end;
  dec(x);
  inc(y);
  inc(k,2);
  until k = b+2;
end;

begin
  clrscr;
  dreieck(3,1,29);
  y := 18;
  x := 38;
  repeat
    gotoxy(x,y);
    textcolor(random(15)+1);
    write('*');
    inc(x);
    if x = 42 then begin inc(y); x := 38; end;
  until y = 23;
  readkey;
  textcolor(lightgray);
  clrscr;
end.
