uses Graph, crt ; var d,m : integer; x,y : word; color : word; begin d := detect; InitGraph(d,m,' '); color:=0; randomize; repeat x := random(getmaxx); y := random(getmaxy); PutPixel(x,y,color); Inc(color); if color=GetMaxcolor then color:=0; until Keypressed; CloseGraph; end.