title: C - Squaring a integer with value 0 is outputting 1?
body: <pre><code>decPlace_volume = floor(volume+.05) - ceil(volume); //should output -1, 0, or 1
  decPlace_volume = pow(decPlace_volume,2); //should the above == -1, this should turn it into 1 while making 0 remain 0
  </code></pre>
  
  <p>The only allowed libraries for my assignment are stdio.h and math.h.</p>
  
  <p>My assignment is pretty simple - find the surface area and volume of a cylinder, and the precision of the output should be 1 unless the output decimal would be 0, in which case the decimal shouldn't be printed. </p>
  
  <p>The above is what I came up with (same thing for surface area just different variables). If the output of the first line is -1, the second line should make it positive, and 0 should stay zero (integer so shouldn't need to worry about funky stuff). </p>
  
  <p>For some reason, when the first line outputs a 0, the second line is outputting 1. Is there something I'm missing here?</p>