title: C Unhandled exception 0xC0000094: Integer division by zero
body: <p>I have been given this error for two days straight, and I have worked on it for about three hours, altogether. When I run it, it will tell me how many $10 bills I need but just stops at the $5 line and gives me this exception every time.</p>
  
  <pre><code>#define _CRT_SECURE_NO_WARNINGS 'code'
  #include &lt;stdio.h&gt;]
  #include &lt;stdlib.h&gt;
  #include "math.h"
  
  int main()
  {
      int ten = 10;
      int five = 5;
      int one = 1;
      float quarter = .25;
      float dime = .10;
      float nickel = .05;
      float penny = .01;
      double money=0;
  
      printf("Please enter a monetary amount:");
  
      scanf_s("%lf", &amp;money);//scanning the entry in, and &amp; is allowing it to be entered
  
      //money is the input number
  
      printf("You entered: %lf \n", money);//creates too many zeroes but for now move on
  
      ten = money / ten;//dividing the change = 10, and then
  
      money = (int) money % ten;//this determines how many tens there are in the mix
      //casted it because it only needs to be an integer not a double
  
      printf("$10     : %d \n", ten);//printing an integer of how many tens are needed to make up money
  
      five = money / five;//dividing the change = 10, and then
  
      money = (int) money % five;//this determines how many tens there are in the mix
      //casted it because it only needs to be an integer not a double
  
      printf("$5      : %d \n", five);
  
      //first problemm I had was putting in const, and that gave me a bajillion errors
  
  
      return(EXIT_SUCCESS);
  }
  </code></pre>