Re: PASCAL'S TRIANGLE



Richard Heathfield wrote:
jmcgill said:

GUPTAJI wrote:
hi all,

can u give me the code to create a Pascal's Triangle........... and
yes, it should work
If you can make this print one more row correctly, I will be impressed.

1 12 66 220 495 792 924 792 495 220 66 12 1

Prepare to be impressed.

I started writing a program that would find the (n+1)th row by
evaluating only the n-th row as an array, but I expected one or two
of the quick thinkers on the list to (a.) correct the errors in my first
program pointing out more problems than there were expressions, and (b.)
post some solution that renders the correct result without any arbitrary
limits, formatting the output so that lines are centered, and all in a
single line of code with no assignments :-)


.