Bell numbers: Difference between revisions

m
→‎{{header|Delphi}}: MAX_N instead of confusing MAX_INDEX.
m (→‎{{header|XPL0}}: MaxN instead of confusing MaxIndex.)
m (→‎{{header|Delphi}}: MAX_N instead of confusing MAX_INDEX.)
Line 1,574:
 
const
MAX_INDEXMAX_N = 25; // maximum index of Bell number within the limits of int64
var
n : integer; // index of Bell number
j : integer; // loop variable
a : array [0..MAX_INDEXMAX_N - 1] of int64; // working array to build up B_n
 
{ Subroutine to display that a[0] is the Bell number B_n }
Line 1,591:
a[0] := 1;
Display(); // some programmers would prefer Display;
while (n < MAX_INDEXMAX_N) do begin // and give begin a line to itself
a[n] := a[0];
for j := n downto 1 do inc( a[j - 1], a[j]);
512

edits