title: Can anyone notice where the mistakes is in my code?
body: <p>Can anyone tell me why is my output wrong &quot;1* 3 = 1&quot; whereas other multiplications is correct? Thanks!</p>
  <pre><code>#include &lt;stdio.h&gt;
  int main()
  {
      int n,i = 1, total;
      
      printf(&quot;\nPlease enter multiplication table: &quot;);
      scanf(&quot;%d&quot;, &amp;n);
      printf(&quot;%d Times Table\n&quot;,n);
  
      while(i&lt;= 12)
      {   
      printf(&quot;\n%d*%d=%d&quot;, i, n, total);
      i++;
      total = i*n;
      }       
  }
  </code></pre>