title: remove trailing zeros from output
body: <p>So my program works and compiles it does what I ask.
  But my program's output has these trailing zeros that I would like to eliminate.
  It's not like it bothers me but I definitely would like to have it cleaned up a little.
  If anyone could give me a little insight on how to eliminate the trailing zeros your help, 
  would be greatly appreciated.</p>
  
  <pre><code>#include "stdafx.h"
  #include "stdio.h"
  #define BPR 10      // Basic Pay Rate is $10.00/hr.
  #define OTPR 15     // Over Time is time and a half.
  #define OT 40       // Overtime is after 40 hours.
  #define RATE1 .15   // Tax Rate 15%.
  #define RATE2 .20   // Tax Rate 20%.
  #define RATE3 .25   // Tax Rate 25%.
  #define LIMIT1 300.00  // The first 300.00.
  #define LIMIT2 200.00  // 200 after the first 300.
  
  int main(void)
  {
      int hours;
      double tax;
      double gross;
      double taxes1=0,taxes2=0,taxes3=0;
      double net;
      double hold1=0,hold2=0,hold3=0;
  
      printf("Please enter hours worked: ");
      scanf_s("%i", &amp;hours);
          if(hours &lt; OT)
              gross=hours*BPR;
          else
          gross=((hours-OT)*OTPR+(OT*BPR));
  
      if(gross &gt; LIMIT2 &amp;&amp; gross &lt; LIMIT1)
         taxes1=gross*RATE2, hold1=gross-taxes1; 
      if(gross &gt; LIMIT1)
         taxes2=gross*RATE1, hold2=gross-taxes2;
      if(gross &lt; LIMIT2)
         taxes3=gross*RATE3, hold3=gross-taxes3;
      if(gross &gt; 0)
      {
         net=(hold1+hold2+hold3);
         tax=(taxes1+taxes2+taxes3);
      }
  
      printf("Your Net Pay is %f\n", net);
      printf("Your Gross Pay was %f\n", gross);
      printf("Your Taxes paid are %f\n", tax);
  
  
  
      return 0;
  }
  </code></pre>
  
  <p>if 65 was put in for the hours variable the output would read:</p>
  
  <p>Your Net pay is 828.750000</p>
  
  <p>Your Gross Pay was 975.000000</p>
  
  <p>Your Taxes paid are 146.250000</p>
  
  <p>as you can see there are a lot of zeros I would love to have disappear please help ?</p>