Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my ($product,@values); @values = (7,38,44,2,0); foreach my $number (@values) { unless($number == 0) { print $number; $product *= $number for($number;$number >0;$number--); print " Factorial is $product\n"; } else { print "0 Factorial is 1\n"; } } exit(0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: back iffing with for?
by ysth (Canon) on Apr 06, 2005 at 03:31 UTC | |
by ikegami (Patriarch) on Apr 06, 2005 at 04:26 UTC | |
|
Re: back iffing with for?
by crashtest (Curate) on Apr 06, 2005 at 04:21 UTC | |
|
Re: back iffing with for?
by tlm (Prior) on Apr 06, 2005 at 10:40 UTC | |
|
Re: back iffing with for?
by jhourcle (Prior) on Apr 06, 2005 at 03:39 UTC | |
by ikegami (Patriarch) on Apr 06, 2005 at 04:31 UTC | |
by ysth (Canon) on Apr 06, 2005 at 05:11 UTC | |
by jhourcle (Prior) on Apr 06, 2005 at 11:06 UTC |