Uses crt,graph; const k=6; var n,x,y: integer; procedure snow (x0,y0,r,n: integer); const t=2*pi/k; var i,x,y: integer; begin for i: =1 to k do begin x: =x0+round(r*cos(i*t)); y: =y0-round(r*sin(i*t)); line(x0,y0,x,y); if n> 1 then snow(x,y,r div 3,n-1); end; end; begin clrscr; repeat writeln('glubina rekursii do 6: '); readln(n); until n in [1..6]; x: =detect; initgraph(x,y,''); x: =getmaxx div 2; y: =getmaxy div 2; snow(x,y,100,n); readkey; end. 19: 06: 14 uses crt,graphabc; const k=6; var n,x,y: integer; , мне исправить программу! это снежинка в паскале рекурсии!
uses graphABC;
const k=6;
var
n,x,y:integer;
procedure snow (x0,y0,r,n:integer);
const t=2*pi/k;
var
i,x,y:integer;
begin
for i:=1 to k do
begin
x:=x0+round(r*cos(i*t));
y:=y0-round(r*sin(i*t));
line(x0,y0,x,y);
if n>1 then snow(x,y,r div 3,n-1);
end;
end;
begin
repeat
writeln('Glubina rekursii do 6:');
readln(n);
until n in [1..6];
x:=WindowWidth div 2;
y:=WindowHeight div 2;
snow(x,y,100,n);
end.