title: why can't this code be used to find the lcm of two numbers?
body: <p>This is the code I wrote. Please tell me the mistakes and knowledge gap I may have</p>
  <pre><code>#include &lt;stdio.h&gt;
  int main()
  {  
     int i,n,c=1;
     printf(&quot;enter the number 1:&quot;);
     scanf(&quot;%d&quot;,&amp;i);
     printf(&quot;enter the second number:&quot;);
     scanf(&quot;%d&quot;,&amp;n);
     while (i!=n)
     {
      c++;
      i=i*c;
      n=n*c;
     }
     
     printf(&quot;the lcm is %d&quot;,i);  
     return 0;
  }
  </code></pre>
  <p>Input I put: 2 &amp; 3</p>
  <p>The output I get: The lcm is 0</p>
  <p>Output expected: The lcm is 6</p>