Catalan numbers/Pascal's triangle: Difference between revisions
Catalan numbers/Pascal's triangle (view source)
Revision as of 21:13, 29 December 2016
, 7 years ago→{{header|smart BASIC}}
Line 1,361:
FOR n = 1 TO x
FOR m = n TO 1 STEP -1
t(m) = t(m) + t(m-1)
NEXT m
t(n+1) = t(n)
FOR m = n+1 TO 1 STEP -1
t(m) = t(m) + t(m-1)
NEXT m
PRINT n,"#######":t(n+1) - t(n)
|