Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Bell-numbers/Chipmunk-Basic/bell-numbers.basic
Normal file
22
Task/Bell-numbers/Chipmunk-Basic/bell-numbers.basic
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
100 cls
|
||||
110 dim a(13)
|
||||
120 for i = 0 to ubound(a) : a(i) = 0 : next i
|
||||
130 n = 0
|
||||
140 a(0) = 1
|
||||
150 displayrow()
|
||||
160 while n <= ubound(a)
|
||||
170 a(n) = a(0)
|
||||
180 j = n
|
||||
190 while j >= 1
|
||||
200 jm1 = j-1
|
||||
210 a(jm1) = a(jm1)+a(j)
|
||||
220 j = j-1
|
||||
230 wend
|
||||
240 n = n+1
|
||||
250 displayrow()
|
||||
260 wend
|
||||
270 end
|
||||
280 sub displayrow()
|
||||
290 print "B(";
|
||||
300 print right$(str$(n),2)") = " a(0)
|
||||
310 return
|
||||
Loading…
Add table
Add a link
Reference in a new issue