Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: greatest common factor

by zeno (Friar)
on Feb 07, 2001 at 16:16 UTC ( #56937=note: print w/ replies, xml ) Need Help??


in reply to greatest common factor

Very elegantly done. BTW, there's a typo in the sub multigcf: gcd should be gcf! Otherwise, a very nice offering.
-zeno

sub multigcf { my $x = shift; $x = gcd($x, shift) while @_; #should be gcf! return $x; }


Comment on Re: greatest common factor
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-10-24 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (130 votes), past polls