Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime!doorstop.austin.ibm.com!tif From: tif@doorstop.austin.ibm.com (Paul Chamberlain) Newsgroups: comp.unix.questions Subject: Re: LCM: Least Common Multiplier Message-ID: <2683@awdprime.UUCP> Date: 6 Jul 90 19:01:36 GMT References: <17000004@uicsl.csl.uiuc.edu> Sender: news@awdprime.UUCP Reply-To: tif@doorstop.austin.ibm.com (Paul Chamberlain) Organization: IBM AWD, Austin, TX Lines: 22 In article <17000004@uicsl.csl.uiuc.edu> nikki@uicsl.csl.uiuc.edu writes: >I am looking for a program which is capable of computing LCM (Least Common >Multiplier) of many numbers (Max. of ~20). E-mail might be tricky -- besides I'm kind of proud of this. I wrote a program (220 lines) that give GCD and LCM. Most of it is a routine that finds the next prime :-). Currently it will take as many numbers as you like on the command line. It is limited to long integer math. For example lcm 20 36 48 72 34 8 38 24 22 112 46 gives LCM = 411863760 GCD = 2 Mail to the path in my signature if you're interested. Paul Chamberlain | I do NOT represent IBM tif@doorstop, sc30661@ausvm6 512/838-7008 | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif