title: c programming division not behaving as expected
body: <p>I'm not getting the expected result when I do division. Can someone please tell me what I'm doing wrong? </p>
  
  <pre><code>int page_list_size = 20; 
  int page_fault_counter = 0;
  double failure = 0.0;
  double success = 0.0;
  failure = page_list_size / page_fault_counter;
  success = 1 - failure;
  printf("failure Is %lf\n",failure);
  printf("success Is %lf\n",success);
  
  failure Is 1.000000
  success Is 0.000000
  </code></pre>
  
  <p>Should be some decimal number between 0 and 1, and they should add up to 1. </p>