title: How can I get the LCM of 2 numbers without GCD?
body: <p>I'm trying to make a Fraction Calculator in VB.NET, but I'm stuck with the LCM part. I found some code on the internet:</p>
  <pre><code>Public Shared Function GCD(a As Integer, b As Integer) As Integer
          If a = 0 Then
              Return b
          End If
          Do While b &lt;&gt; 0
              If a &gt; b Then
                  a = a - b
              Else
                  b = b - a
              End If
          Loop
          Return a
      End Function
  
      Public Shared Function LCM(a As Integer, b As Integer) As Int64
          Return Math.BigMul(Math.Abs(a), Math.Abs(b)) \ GCD(a, b)
      End Function
  </code></pre>
  <p>But when I'm trying to get the LCM, it shows me the second number every time! e.g When I try to get the LCM of 2 and 3 it shows me 3.</p>
  <p>How can I get the LCM without GCD?</p>