title: How can i check if double is multiple 5?
body: <p>How can I check if a double (to 2 decimals) is a multiple of 5??</p>
  
  <p>as we all know the % operator doesn't work on double data types..</p>
  
  <p>and </p>
  
  <p>fmod() doesn't seem to be very reliabe.... </p>
  
  <p>what I want to do is check if <code>payment</code> is a multiple of .05.</p>
  
  <p>this is what i am trying with fmod(), where <code>remainder</code> and <code>payment</code> are both doubles</p>
  
  <pre><code>remainder = fmod(payment, 5)
  </code></pre>
  
  <p>when i use small decimals such as; .05, .10, .15, .20 i get exponential notation even if I use </p>
  
  <pre><code>   cout &lt;&lt; setiosflags(ios::showpoint) &lt;&lt; setprecision(3) &lt;&lt; modulo &lt;&lt; "  space   " &lt;&lt; payment &lt;&lt; endl; 
  </code></pre>
  
  <p>not sure what I'm doing wrong </p>