home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / sm30a.zip / GCD.(X) < prev    next >
Text File  |  1993-10-16  |  141b  |  5 lines

  1. #    gcd(a,b) gives the greatest common dividor of a and b
  2. #    e.g. gcd(9,6) gives 3
  3.  
  4. gcd(a_, b_) := if(mod(a,b) == 0, b, gcd(b, mod(a,b)) )
  5.