Catalan numbers/Pascal's triangle: Difference between revisions

Add Nimrod
(Added zkl)
(Add Nimrod)
Line 210:
2674440
9694845</pre>
 
=={{header|Nimrod}}==
{{trans|Python}}
<lang nimrod>const n = 15
var t = newSeq[int](n + 2)
 
t[1] = 1
for i in 1..n:
for j in countdown(i, 1): t[j] += t[j-1]
t[i+1] = t[i]
for j in countdown(i+1, 1): t[j] += t[j-1]
stdout.write t[i+1] - t[i], " "</lang>
Output:
<pre>1 2 5 14 42 132 429 1430 4862 16796 58786 208012 742900 2674440 9694845 </pre>
 
=={{header|PARI/GP}}==
Anonymous user