home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
cmplngmg
/
cl_jun89.arc
/
AWK210.ARC
/
GCD.AWK
< prev
next >
Wrap
Text File
|
1987-12-11
|
286b
|
11 lines
{
arg1 =$1; arg2 = $2;
while (arg1 != arg2) {
if (arg1 > arg2)
arg1 -= arg2
else
arg2 -= arg1
}
print "The greatest common divisor of", $1, "and", $2, "is", arg1
}