Uses GraphABC; procedure Draw(x, y, l, u : Real; t : Integer);
procedure Draw2(Var x, y: Real; l, u : Real; t : Integer); begin Draw(x, y, l, u, t); x := x + l*cos(u); y := y - l*sin(u);end; begin if t > 0 then beginl := l/3;Draw2(x, y, l, u, t-1);Draw2(x, y, l, u+pi/3, t-1); Draw2(x, y, l, u-pi/3, t-1);Draw2(x, y, l, u, t-1);end else Line(Round(x), Round(y), Round(x+cos(u)*l), Round(y-sin(u)*l))end; begin SetWindowSize(425,500); SetWindowCaption('Фракталы: Снежинка Коха'); Draw(10, 354, 400, pi/3, 4);Draw(410, 354, 400, pi, 4); Draw(210, 8, 400, -pi/3, 4);end.
var i,j,n:longint; f:boolean; begin writeln('Введите число'); readln(n); if n<2 then writeln('Простых делителей нет') else begin write('Число ',n,' ','= 1'); for i:=2 to n do if n mod i=0 then begin f:=true; j:=2; while f and(j<=round(sqrt(i/2)))do begin if i mod j=0 then f:=false else j:=j+1; end; if f then write('*',i); end; end; end.