The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Find LCM of 2 numbers without using GCD
07-30-2018, 01:06 PM (This post was last modified: 07-30-2018 01:18 PM by Gamo.)
Post: #1
Find LCM of 2 numbers without using GCD
Found this topic interesting and would like to share the concept on how to find the LCM without first calculating the GCD.

The approach is to start with the largest of the 2 numbers and keep incrementing the larger number by itself till smaller number perfectly divides the resultant.

Example: (7, 5)

7 + 7 + 7 +7 + 7 = 35

35 divide 5 perfectly so LCM is 35

The problem is I'm still figuring out on how to program this algorithm by using RPN programmable calculator.
Anyone with a solution is welcome to share here.

Thank You

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


Messages In This Thread
Find LCM of 2 numbers without using GCD - Gamo - 07-30-2018 01:06 PM



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