home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dos/V Magazine 2002 July 1
/
VMAG130101.iso
/
ONLINE
/
monthly
/
calc
/
CLPCA511.LZH
/
ClipCalc
/
EXTFUNC
/
gcd.cef
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Windows-1254 (detected)
Wrap
Text File
|
2002-08-18
|
228 b
|
12 lines
#!/usr/local/bin/clip
#ì┼æσî÷û±Éö greatest common divisor
#\!- <val> [<val> ...]
for [@*] = 1; [@*] < @!; [@*]++
@x = @:('0 + [@*]); @y = @0
while @y != 0
@t = @x % @y; @x = @y; @y = @t
endwhile
@0 = @x
next
@0