title: How can I divide two doubles and output the quotient?
body: <p>As part of this program I'm creating in C I have to divide a double value called 'money' by a decimal number (e.g. 0.55, 0.85, 0.90 etc.). I then want to store the value of this division and output ONLY the integer of this division and not the remainder.
  For example if I did 1.30 / 0.55 then the real answer is 2.363636..
  However I only want to output the 2 part of the answer and not the remainder. When I run my program however the output of this division is always 0.000000 and I cannot work out why the answer isn't correct.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main( void )
  {
    char candy;
    double money;
    double quant;
    scanf( "%c %lf", &amp;candy, &amp;money );
  
    switch ( candy )
    {
    case 'a' :
       quant = money / 0.55;
       if ( quant &gt;= 1 )
          printf( "You selected Mars and have enough money to buy %1.lf bars", &amp;quant );
       else
          printf( "You selected Mars, but, do not have enough money" );
       break;
  </code></pre>
  
  <p>For example when I enter money as 1.40 then I am expecting:
  "You selected Mars and have enough money to buy 2 bars"
  However the actual output is:
  "You selected Mars and have enough money to buy 0.0000000 bars"</p>
  
  <p>I'm quite new to C programming so any help would be greatly appreciated!
  Many thanks</p>