How to resolve the algorithm Multifactorial step by step in the МК-61/52 programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Multifactorial step by step in the МК-61/52 programming language
Table of Contents
Problem Statement
The factorial of a number, written as
n !
{\displaystyle n!}
, is defined as
n !
n ( n − 1 ) ( n − 2 ) . . . ( 2 ) ( 1 )
{\displaystyle n!=n(n-1)(n-2)...(2)(1)}
. Multifactorials generalize factorials as follows: In all cases, the terms in the products are positive integers. If we define the degree of the multifactorial as the difference in successive terms that are multiplied together for a multifactorial (the number of exclamation marks), then the task is twofold:
Note: The wikipedia entry on multifactorials gives a different formula. This task uses the Wolfram mathworld definition.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Multifactorial step by step in the МК-61/52 programming language
Source code in the мк-61/52 programming language
П1 <-> П0 П2 ИП0 ИП1 1 + - x>=0
23 ИП2 ИП0 ИП1 - * П2 ИП0 ИП1 -
П1 БП 04 ИП2 С/П
You may also check:How to resolve the algorithm Mandelbrot set step by step in the Swift programming language
You may also check:How to resolve the algorithm Semordnilap step by step in the Ring programming language
You may also check:How to resolve the algorithm Sorting algorithms/Cocktail sort step by step in the Fortran programming language
You may also check:How to resolve the algorithm Round-robin tournament schedule step by step in the EasyLang programming language
You may also check:How to resolve the algorithm Queue/Usage step by step in the Nim programming language