ScratchData LogoScratchData
Back to rex5554's profile

Ultra Fast GCF/GCD and LCM Calculator

RErex5554•Created February 22, 2016
Ultra Fast GCF/GCD and LCM Calculator
1
1
52 views
View on Scratch

Instructions

Enter in the numbers.

Description

This GCF/GCD (greatest common factor/divisor) calculator calculates the GCF/GCD of two numbers extremely fast. It uses the Euclidian algorithm: Example: GCF(40,18) Take the remainder of 40/18: 40 mod 18 = 4 Take the remainder of 18/4: 18 mod 4 = 2 Take the remainder of 4/2: 4 mod 2 = 0 When the remainder is 0, take the divisor of the last modulo and it is the GCF: GCF(40,18) = 2 Since ab = GCF(a,b) * LCM(a,b), by dividing by the GCF, the LCM can be calculated by LCM(a,b) = ab / GCF(a,b).

Project Details

Project ID98841405
CreatedFebruary 22, 2016
Last ModifiedFebruary 25, 2016
SharedFebruary 23, 2016
Visibilityvisible
CommentsAllowed