in reply to New Jersey Lottery Probability
Or to do my best at obfuscation ... the ever popular one liner:#!/usr/bin/perl use strict; my $probability = permutation(50, 5); print $probability * 36; sub permutation { my $number = shift; my $count = shift || return 1; return $number * permutation($number-1,$count-1); }
Useless, but fun anyway.sub permutation { return $_[1] ? $_[0] * permutation($_[0]-1,$_[1]-1) : 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: New Jersey Lottery Probability
by chromatic (Archbishop) on May 04, 2000 at 04:47 UTC | |
by perlmonkey (Hermit) on May 04, 2000 at 11:34 UTC | |
by perlmonkey (Hermit) on May 04, 2000 at 05:55 UTC |