code/mathematical_algorithms/src/gcd_and_lcm/README.md
The Least Common Multiple (LCM) is also referred to as the Lowest Common Multiple (LCM) and Least Common Divisor (LCD). For two integers a and b, denoted LCM(a,b), the LCM is the smallest positive integer that is evenly divisible by both a and b. For example, LCM(2,3) = 6 and LCM(6,10) = 30.
The LCM of two or more numbers is the smallest number that is evenly divisible by all numbers in the set.
The greatest common factor (GCF or GCD or HCF) of a set of whole numbers is the largest positive integer that divides evenly into all numbers with zero remainder. For example, for the set of numbers 18, 30 and 42 the GCF = 6.
<b>Greatest Common Factor of 0</b>
Any non zero whole number times 0 equals 0 so it is true that every non zero whole number is a factor of 0.
k × 0 = 0 so, 0 ÷ k = 0 for any whole number k.
For example, 5 × 0 = 0 so it is true that 0 ÷ 5 = 0. In this example, 5 and 0 are factors of 0.
GCF(5,0) = 5 and more generally GCF(k,0) = k for any whole number k.
However, GCF(0, 0) is undefined.