Как посчитать факториалDelphi , Синтаксис , МатематикаКак посчитать факториалАвтор: http://www.swissdelphicenter.ch { The factorial of a positive integer is defined as: n! = n*(n-1)*(n-2)*(n-3)*...*2*1 1! = 1 0! = 1 Example: 5! = 5*4*3*2*1 } // Iterative Solution: function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; // Recursive Solution: function FacRecursive(n: Word): LongInt; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; Here's the translation of the provided content into Russian: Итеративное решение:
Эта функция начинается с инициализации переменной Рекурсивное решение:
Эта функция использует рекурсивный подход для расчета факториала. Если значение входного параметра Как использовать:
Обратите внимание, что рекурсивный подход может вызвать переполнение стека для больших значений входных параметров из-за избыточных функциональных вызовов. В таких случаях итеративное решение обычно более эффективно. Альтернативное решение:
Если вы ищете альтернативное решение, вы можете использовать функцию
Эта подход более компактный и эффективен, чем оба итеративного и рекурсивного решения. Однако она может не быть доступна в всех версиях Delphi. ```python Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Longint; fac_iterative_result := FacIterative(5); # Calculate 5! WriteLn(fac_iterative_result); # Output: 120 Var fac_recursive_result : Longint; fac_recursive_result := FacRecursive(5); # Calculate 5! WriteLn(fac_recursive_result); # Output: 120 Alternative solution:function Fac(n: Word): Longint; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:функция FacIterative(n: Слово): Длинное целое; var f: Длинное целое; i: Целое; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:функция FacRecursive(n: Слово): Длинное целое; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; How to use:Var fac_iterative_result : Длинное целое; fac_iterative_result := FacIterative(5); # Расчитать 5! WriteLn(fac_iterative_result); # Вывод: 120 Var fac_recursive_result : Длинное целое; fac_recursive_result := FacRecursive(5); # Расчитать 5! WriteLn(fac_recursive_result); # Вывод: 120 Alternative solution:функция Fac(n: Слово): Длинное целое; begin Result := Math.Product(1..n); end; Russian translation of the provided contentIterative solution:function FacIterative(n: Word): Longint; var f: LongInt; i: Integer; begin f := 1; for i := 2 to n do f := f * i; Result := f; end; Recursive solution:function FacRecursive(n: Word): Longint; begin if n > 1 then Result := n * FacRecursive(n - 1) else Result := 1; end; Russian translation of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the provided content of the providedcontent of the provided 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 of the 4 Статья описывает определение и расчет факториала положительного целого числа, а также предлагает два способа его вычисления: итеративный и рекурсивный. Комментарии и вопросыПолучайте свежие новости и обновления по Object Pascal, Delphi и Lazarus прямо в свой смартфон. Подпишитесь на наш Telegram-канал delphi_kansoftware и будьте в курсе последних тенденций в разработке под Linux, Windows, Android и iOS Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта. :: Главная :: Математика ::
|
||||
©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007 |