title: LCM algorithm without prime numbers time complexity
body: <p>What would be worst time complexity for calculating LCM without prime numbers?
  My algorithm in C++:</p>
  <pre><code>int a, b, a2, b2;
  cin &gt;&gt; a;
  cin &gt;&gt; b;
  a2 = a;
  b2 = b;
  
  while(a!=b) {
      if(a&gt;b) b+=b2;
      if(b&gt;a) a+=a2;
  }
  cout &lt;&lt; a &lt;&lt; &quot; X &quot; &lt;&lt; b &lt;&lt; endl;
  </code></pre>