Pascal's triangle: Difference between revisions
Content added Content deleted
imported>Maxima enthusiast |
|||
Line 4,181: | Line 4,181: | ||
=={{header|Maxima}}== |
=={{header|Maxima}}== |
||
<syntaxhighlight lang="maxima"> |
<syntaxhighlight lang="maxima"> |
||
sjoin(v, j) := apply(sconcat, rest(join(makelist(j, length(v)), v)))$ |
|||
display_pascal_triangle(n) := for i from 0 thru 6 do disp(sjoin(makelist(binomial(i, j), j, 0, i), " ")); |
display_pascal_triangle(n) := for i from 0 thru 6 do disp(sjoin(makelist(binomial(i, j), j, 0, i), " ")); |
||
Line 4,192: | Line 4,193: | ||
"1 4 6 4 1" |
"1 4 6 4 1" |
||
"1 5 10 10 5 1" |
"1 5 10 10 5 1" |
||
"1 6 15 20 15 6 1" */ |
"1 6 15 20 15 6 1" */ |
||
</syntaxhighlight> |
|||
=={{header|Metafont}}== |
=={{header|Metafont}}== |