in reply to Re: Pascal triange...
in thread Pascal's triangle...
sub pascal { my @row = (0) x $_ [0]; $row [0] = 1; foreach (1 .. shift) { print "@row[0 .. $_ - 1]\n"; $row [$_] += $row [$_ - 1] for reverse 1 .. @row; } }
Abigail
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Pascal triange...
by Burak (Chaplain) on Dec 25, 2003 at 14:35 UTC |