Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!noao!ncar!gatech!bloom-beacon!eru!kth.se!sunic!kuling!henrikj From: henrikj@kuling.UUCP (Henrik Johansson) Newsgroups: comp.sys.handhelds Subject: Re: HP48: GCF and LCD programs Message-ID: <1959@kuling.UUCP> Date: 6 Mar 91 18:00:38 GMT References: <5E61BBE10000251E@gacvx2.gac.edu> Reply-To: henrikj@kuling.UUCP (Henrik Johansson) Organization: Upsala University, Sweden Lines: 13 Soeone out there asked for a program that computes the greatest common divisor of two numbers. He had an example written in some strange language, and wanted the HP48- version of it. Here comes one: << WHILE DUP REPEAT SWAP OVER MOD END DROP >> It takes two numbers from the stack and leaves one number on the stack as the result. henrikj@kuling.docs.uu.se