Pascal's triangle: Difference between revisions

Content added Content deleted
m (tried to fix other problems)
m (final fix for problems due to the adding of apl)
Line 74: Line 74:
1 8 28 56 70 56 28 8 1
1 8 28 56 70 56 28 8 1


=={{header|APL}}==
=={{header|APL}}==
Pascal' s triangle of order ⍵

<lang apl>
{A←0,⍳⍵ ⋄ ⍉A∘.!A}
</lang>

example

<lang apl>
<lang apl>
{A←0,⍳⍵ ⋄ ⍉A∘.!A} 3
{A←0,⍳⍵ ⋄ ⍉A∘.!A} 3
Line 95: Line 103:
1 5 10 10 5 1</lang>
1 5 10 10 5 1</lang>



=={{header|APL}}==
Pascal' s triangle of order ⍵

<lang apl>
{A←0,⍳⍵ ⋄ ⍉A∘.!A}
</lang>

example

<lang apl>
{A←0,⍳⍵ ⋄ ⍉A∘.!A} 3
</lang>

<pre>
1 0 0 0
1 1 0 0
1 2 1 0
1 3 3 1
</pre>


=={{header|C++}}==
=={{header|C++}}==