Pascal's triangle: Difference between revisions
Content added Content deleted
(→{{header|Fantom}}: add FOCAL version) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 38: | Line 38: | ||
* [[Evaluate binomial coefficients]] |
* [[Evaluate binomial coefficients]] |
||
<br><br> |
<br><br> |
||
=={{header|11l}}== |
|||
{{trans|Python}} |
|||
<lang 11l>F pascal(n) |
|||
V row = [1] |
|||
V k = [0] |
|||
L 0 .< max(n, 0) |
|||
print(row.join(‘ ’).center(16)) |
|||
row = zip(row [+] k, k [+] row).map((l, r) -> l + r) |
|||
pascal(7)</lang> |
|||
{{out}} |
|||
<pre> |
|||
1 |
|||
1 1 |
|||
1 2 1 |
|||
1 3 3 1 |
|||
1 4 6 4 1 |
|||
1 5 10 10 5 1 |
|||
1 6 15 20 15 6 1 |
|||
</pre> |
|||
=={{header|360 Assembly}}== |
=={{header|360 Assembly}}== |