title: making double variables lower than 1
body: <p>in my ASP.NET project i did a survey page that uses Application to save the votes. I have a problem with the making of the percentages amount. I've tried many things. here is the problematic part of my code:</p>
  
  <pre><code>    double x = (count / sum) ;
      double f = (count1 / sum) ;
      double g = (count2 / sum) ;
      double h = (count3 / sum) ;
      if (sum &gt; 0)
      {
          a = (int)x * 100;
          b = (int)f * 100;
          c = (int)g * 100;
          d = (int)h * 100;
      }
  </code></pre>
  
  <p>I used breakpoints and figured out that the problem was in the double variables: the (count/sum) equals 0 anyway.</p>