Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Pascal's triangle...

by gumby (Scribe)
on Jun 19, 2002 at 13:33 UTC ( [id://175665]=note: print w/replies, xml ) Need Help??


in reply to Pascal's triangle...

#!/usr/bin/perl -wl sub pascal { while (s/\d+(?= (\d+))/$&+$1/eg < shift) { s/^/1 /; print; } }
Which is basically Re: Pascal triange... in essence.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://175665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-16 05:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found