program pierwiastek; begin pref IIUWgraph block const aspekt=1.33333333333, Pi=3.1415926536, jednostka=25; (*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*) unit WaitMoment:procedure; var r:integer; begin call move(290,320); call outstring("Press any key!"); while r = 0 do r:=inkey od; call move(290,320); call outstring(" * "); end WaitMoment; (*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*) unit punkt:class(x,y:real); unit plot:procedure; begin call move(round(x*aspekt)-3,round(y)); call draw(round(x*aspekt)+3,round(y)); call move(round(x*aspekt),round(y)-2); call draw(round(x*aspekt),round(y)+3); end plot; end punkt; (*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*) unit okrag :class (S:punkt;r:real); unit cirb:procedure(alfa,beta:real); var gamma,x,y:real; begin if alfa."); call track(303,202); B:=new punkt(inxpos*(1/aspekt),inypos); call B.plot; call outstring ("B"); call move (100,300); call outstring(" "); AB:=new odcinek(A,B); C:=punkt_odlegly(AB,1); call C.plot; call outstring ("C"); AC:=new odcinek(A,C); call WaitMoment; D:=srodek_odcinka(AC); call D.plot; call outstring("D"); call WaitMoment; o1:=new okrag(D,odleglosc(D,C)); call cirb(round(D.x*aspekt),round(d.y),round(odleglosc(D,C)*aspekt),1,1,1,0,1,1); BE:=prostopadla(AC,B); call WaitMoment; call okrag_odcinek(o1,BE,F,G); wynik:=odleglosc(B,F); call F.plot; call outstring("F"); BF:=new odcinek(B,F); call move(100,310); call outstring("Dlugosc odcinka BF wynosi pierwiastek z dlugosci odcinka AB."); call WaitMoment; call groff end end.