title: What is the difference between 4/3 and 4/3.0?
body: <p>I need to make a program to calculate the volume of a sphere with the formula <code>V=(4/3)*pi*r^3</code></p>
  <p>What is the difference between</p>
  <pre><code>volume_sphere = (4/3)*pi*r*r*r; 
  </code></pre>
  <p>and</p>
  <pre><code>volume_sphere = (4/3.0)*pi*r*r*r; 
  </code></pre>
  <p>?</p>
  <p>When I input the 3 as the value for my r, the former gave me a wrong answer (84.823196). However, when I used the latter one (with the &quot;.0&quot;), it gave me the right answer (113.0976).</p>
  <p>I am so confused with the &quot;.0&quot; difference. Thank you for answering!</p>