uses graph,crt; var g,m:integer; x,y,ug,c,fy,fx:integer; tg,rad:real; begin randomize; readln(ug); c:=0; initgraph(g,m,'C:\Documents and Settings\angelica\Desktop\bin\i386-win32'); setcolor(blue); line(720,0,720,480); line(0,480,720,480); setcolor(white); x:=25+random(669); y:=25+random(429); repeat rad:=ug*pi/180; fx:=x; fy:=y; repeat if (ug<180) then begin x:=fx+round(c*cos(rad)/sin(rad)); end else begin x:=fx-round(c*cos(rad)/sin(rad)); end; if (ug>180) then begin y:=fy+c; end else begin y:=fy-c; end; circle(x,y,25); delay(10); setcolor(black); circle(x,y,25); setcolor(white); c:=c+1; until (x=694) or (x=25) or (y=25) or (y=454); if (y=25) or (y=454) then begin ug:=360-ug; end else begin if (ug<180) then begin ug:=180-ug; end else begin ug:=540-ug; end; end; c:=0; if x=694 then begin x:=693; end; if x=25 then begin x:=26; end; if y=454 then begin y:=453; end; if y=25 then begin y:=26; end; until keypressed; closegraph; end.