Write a method to compute the Least Common Multiple (LCM) of two numbers using loops and conditionals.
The Least Common Multiple of two numbers is the smallest positive integer that is divisible by both numbers. For example, the LCM of 4 and 5 is 20. This can be found by iterating through multiples of the larger number until a multiple of the smaller number is found.
- The method should not use any built-in functions for GCD or LCM.
- The method should handle large values of the input numbers efficiently.
lcm(4, 5); // returns 20