Find LCM of 2 numbers without using GCD
|
07-31-2018, 06:10 PM
Post: #20
|
|||
|
|||
RE: Find LCM of 2 numbers without using GCD
HP-12C Mod program that setup for finding Gcd, thus Lcm too
Sorry if it look stupid ... This is my first HP-12C program (only HP calc I own) Register Y X --> X Mod(Y, X) Keep pressing R/S, eventually it display 0, previous Mod was Gcd (Rotate key to get it back) Code: ; HP-12C Mod Program: Y X --> X Mod(Y, X) Example: gcd(54321, 12345) = 3 54321 Enter 12345 R/S --> 4941 R/S --> 2463 R/S --> 15 R/S --> 3 R/S --> 0 Rotate --> 3 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)