Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -0,0 +1,38 @@
MODULE Multifactorial;
FROM STextIO IMPORT
WriteLn, WriteString;
FROM SWholeIO IMPORT
WriteInt;
VAR
Degree, N: INTEGER;
PROCEDURE MultiFactorial(N, Degree: INTEGER): INTEGER;
VAR
Result, I: INTEGER;
BEGIN
IF (N < 2) THEN
RETURN 1
ELSE
Result := N;
I := N - Degree;
WHILE I >= 2 DO
Result := Result * I;
I := I - Degree
END;
RETURN Result
END
END MultiFactorial;
BEGIN
FOR Degree := 1 TO 5 DO
WriteString("Degree ");
WriteInt(Degree, 1);
WriteString(" =>");
FOR N := 1 TO 10 DO
WriteString(" ");
WriteInt(MultiFactorial(N, Degree), 1);
END;
WriteLn;
END;
END Multifactorial.