F(1) = 1, F(2) = 1 F(n) = F(n-2)*n, при n > 2
procedure F(n: integer); begin writeln('*'); if n > 0 then begin F(n-3); F(n-2); F(n div 2); F(n div 2); end end;
procedure F(n: integer); begin if n > 0 then begin F(n-2); F(n-1); F(n-1); end; writeln('*'); end;
procedure F(n: integer); begin writeln(n); if n < 5 then begin F(n+2); F(n*2) end end;
procedure F(n: integer); begin writeln(n); if n < 5 then begin F(n+3); F(n*3) end end;
procedure F(n: integer); begin writeln(n); if n < 7 then begin F(n+3); F(n*2) end end;
procedure F(n: integer); begin writeln(n); if n < 7 then begin F(n+2); F(n+3) end end;
procedure F(n: integer); forward; procedure G(n: integer); forward; procedure F(n: integer); begin if n > 0 then G(n - 1); end; procedure G(n: integer); begin writeln('*'); if n > 1 then F(n - 2); end;
procedure F(n: integer); forward; procedure G(n: integer); forward; procedure F(n: integer); begin if n > 0 then begin G(n - 1); end; end; procedure G(n: integer); begin writeln('*'); if n > 1 then begin F(n - 3); end; end;
function F(n: integer): integer; begin if n > 2 then F := F(n - 1) + G(n - 2) else F := 1; end; function G(n: integer): integer; begin if n > 2 then G := G(n - 1) + F(n - 2) else G := 1; end;