Jump to content

Catalan numbers/Pascal's triangle: Difference between revisions

Added 11l
No edit summary
(Added 11l)
Line 14:
[[Pascal's triangle]]
<br><br>
 
=={{header|11l}}==
{{trans|Python}}
<lang 11l>V n = 15
V t = [0] * (n + 2)
t[1] = 1
L(i) 1 .. n
L(j) (i .< 1).step(-1)
t[j] += t[j - 1]
t[i + 1] = t[i]
L(j) (i + 1 .< 1).step(-1)
t[j] += t[j - 1]
print(t[i + 1] - t[i], end' ‘ ’)</lang>
{{out}}
<pre>
1 2 5 14 42 132 429 1430 4862 16796 58786 208012 742900 2674440 9694845
</pre>
 
=={{header|360 Assembly}}==
1,481

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.