Bell numbers: Difference between revisions
Content deleted Content added
→{{header|ANSI BASIC}}: Added a solution. |
m →{{header|Modula-2}}: MaxN instead of confusing MaxIndex. |
||
Line 2,531:
MODULE BellNumbers;
FROM STextIO IMPORT
WriteLn, WriteString;
FROM SWholeIO IMPORT
WriteInt;
CONST
VAR
A: ARRAY [0 ..
I, J, N: CARDINAL;
PROCEDURE DisplayRow(N, BellNum: CARDINAL);
BEGIN
Line 2,553:
BEGIN
FOR I := 0 TO
A[I] := 0
END;
Line 2,559:
A[0] := 1;
DisplayRow(N, A[0]);
WHILE N <
A[N] := A[0];
FOR J := N TO 1 BY -1 DO
|