function fact2(value:integer); var i:integer; begin i := 2; result := 1; while (i <= value) do begin result := result * i; i := i + 2; end; end;