Post Reply 
(12C Platinum) GCD & LCM
01-13-2019, 11:05 AM (This post was last modified: 01-13-2019 11:06 AM by Gamo.)
Post: #1
(12C Platinum) GCD & LCM
ALG Mode program solutions for GCD and LCM

----------------------------------------------------

Procedure:

a [R/S] b [R/S] display GCD [R/S] display LCM

Remark:

a and b can be switch around as b and a

---------------------------------------------------
Example:

(256, 562)

256 [R/S] display 256
562 [R/S] display 2 // GCD
[R/S] display 71936 // LCM

Answer:
GCD = 2
LCM = 71936

------------------------------------------------
Program: ALG mode
Code:

[STO] 0 [x] [R/S]
[STO] 1 [=] [STO] 2
[RCL] 0 - [RCL] 1 [=] [STO] 3 
1 [CHS] [X<>Y] [X≤Y] [GTO] 030
[RCL] 3 [CHS] 1 [CHS]  [X<>Y] [X≤Y] [GTO] 034
[RCL] 2 [÷] [RCL] 0 [R/S] [=] [GTO] 000
[RCL] 3 [CHS] [STO] 1 [GTO] 007
[CHS] [STO] 0 [GTO] 007

Gamo
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)