Pascal's triangle: Difference between revisions

Content added Content deleted
Line 785: Line 785:


For n = 0, prints nothing. For negative n, throws an exception.
For n = 0, prints nothing. For negative n, throws an exception.
=={{header|Pari\GP}}==
=={{header|PARI\GP}}==
<lang Pari\GP>pascals_triangle(N)= {
<lang PARI\GP>pascals_triangle(N)= {
my(row=[],prevrow=[]);
my(row=[],prevrow=[]);
for(x=1,N,
for(x=1,N,