program Sterne_fliegen;
uses Crt,Graph;
var Gd, Gm : Integer;
    d,h,g,t,x,y,z  : integer;
label 1;
begin
  Gd := Detect;
  InitGraph(Gd, Gm, '');
  if GraphResult <> grOk then
    Halt(1);
  z := 15;
  randomize;
  repeat
    y := 0;
    g := 0;
    x := random(640);
    t := random(480);
    z := random(3);
    if z = 0 then h := 15;
    if z = 1 then h := 7;
    if z = 2 then h := 8;
    repeat
      putpixel(x,y,0);
      inc(y);
      putpixel(x,y,h);
      delay(1);
      inc(g);
      if keypressed then goto 1;
    until g = t;
    if keypressed then goto 1;
    if d = 400 then goto 1;
    inc(d);
  until false;
1:readkey;
  closegraph;
end.