Bell numbers: Difference between revisions
Content added Content deleted
m (→{{header|Modula-2}}: MaxN instead of confusing MaxIndex.) |
m (→{{header|XPL0}}: MaxN instead of confusing MaxIndex.) |
||
Line 4,544: | Line 4,544: | ||
\Bell numbers |
\Bell numbers |
||
code CrLf=9, IntOut=11, Text=12; |
code CrLf=9, IntOut=11, Text=12; |
||
define |
define MaxN = 14; |
||
integer A( |
integer A(MaxN), I, J, N; |
||
begin |
begin |
||
for I:= 0 to |
for I:= 0 to MaxN - 1 do A(I):= 0; |
||
N:= 0; A(0):= 1; |
N:= 0; A(0):= 1; |
||
Text(0, "B("); IntOut(0, N); Text(0, ") = "); IntOut(0, A(0)); CrLf(0); |
Text(0, "B("); IntOut(0, N); Text(0, ") = "); IntOut(0, A(0)); CrLf(0); |
||
while N < |
while N < MaxN do |
||
begin |
begin |
||
A(N):= A(0); |
A(N):= A(0); |