home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH10 / A10225.WAV (.mp3) < prev    next >
Waveform Audio File Format  |  1993-11-29  |  310.7 KB  |  1 channel  |  11,025 sample rate  |  29 seconds
Transcription: The function GCD finds the greatest common divisor, or GCD, of its two arguments. Since it is recursive, this function cannot be an inline function. The algorithm used here is based on two facts. The first is that the GCD of any positive integer and zero is the positive integer. The second is that the GCD of any two positive integers, x and y, equals the GCD of y and x mod y.