for the HP 15C
LCM/GCD - Least common multiple and greatest common divisor of two positive integers

Usage
[GSB] 2
Input
Output

Program list
LCMGCD - Rev.1.0 : Jan. 20 2012
001-42,21, 2 LBL 2
002-   44 25 STO i
003-      36 ENTER
004-      36 ENTER
005-   43 33 R↑
006-44,20,25 STO× i
007-42,21,.2 LBL .2
008-      36 ENTER
009-      33 R↓
010-      10 ÷
011-   43 44 INT
012-   43 33 R↑
013-      20 ×
014-      30 -
015-43,30, 0 TEST 0 /* x≠0? */
016-   22 .2 GTO .2
017-42, 4,25 x<> i
018-      34 x<>y
019-      10 ÷
020-   43 32 RTN


www.finetune.co.jp [Mail] © 2000 Takayuki HOSODA.
Powered by
 Finetune