title: Problem occuring when not using double typecaster
body: <pre><code>int sum, a;
  sum=17;a=5;
  double mean = sum/a;
  printf(&quot;%f&quot;,mean);
  </code></pre>
  <p>In the above code, the answer I get is 3.0000000.
  However when I modify it to (double)sum/a, the answer I get is 3.4000000.</p>
  <p>Can anyone explain what is going on.</p>