title: How to read an input of Real Numbers and use them
body: <p>Hello I have very little experience with coding but the problem that I am working on for school requires me to have an input such as " 12.5 " and have that input be processed to give me a certain output.</p>
  
  <p>I am trying to modify this code to do that but with no luck</p>
  
  <p>The code is in C</p>
  
  <p>For example the "<strong>rate</strong>" would be something like "<strong>12.5</strong>", but it only reads the "<strong>12</strong>" and then it continues the calculations with the <strong>12</strong>, and ignores the <strong>.5</strong></p>
  
  <p>I need it to read the whole <strong>12.5</strong></p>
  
  <p>Thanks for any help available. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main ()
  {
      int hours_2weeks;
      int rate;
      int Gross_Pay;
      int Social_security_tax;
      int Federal_tax;
      int State_tax;
      int Medical_dental;
      int Net_Pay;
      printf("\nPayroll Program for X Y Z Corp.\n");
      {
      printf("Enter hours worked: ");
      scanf("%d", &amp;hours_2weeks);
  
      printf("Enter hourly rate: ");
      scanf("%d", &amp;rate);
      }
      printf("This employee worked %d hours with a salary of $%d per hour. Here is the salary statement for this employee:\n",hours_2weeks,rate);
  
      Gross_Pay=hours_2weeks*rate;
      printf("Gross Pay: %d\n", Gross_Pay);
      Social_security_tax=hours_2weeks*rate*.06;
      printf("Social security tax: -%d\n", Social_security_tax);
      Federal_tax=hours_2weeks*rate*.1;
      printf("Federal tax: -%d\n", Federal_tax);
      State_tax=hours_2weeks*rate*.05;
      printf("State tax: -%d\n", State_tax);
      Medical_dental=hours_2weeks*rate*.05;
      printf("Medical/dental: -%d\n", Medical_dental);
      Net_Pay=hours_2weeks*rate-(hours_2weeks*rate*.06)-(hours_2weeks*rate*.1)-(hours_2weeks*rate*.05)-(hours_2weeks*rate*.05);
      printf("Net Pay: %d\n", Net_Pay);
  }
  </code></pre>