home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Open 13
/
pcopen13.iso
/
Zip
/
SM34A.ZIP
/
LIBRARY
/
GCD.LI
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1993-10-16
|
141 b
|
5 lines
# gcd(a,b) gives the greatest common dividor of a and b
# e.g. gcd(9,6) gives 3
gcd(a_, b_) := if(mod(a,b) == 0, b, gcd(b, mod(a,b)) )