title: Output is always in +ve value not the -ve for floating point values
body: <p>i don't know if some body asked this question before or not, but here is mine:
  if i have following code; what the value of total will be?
  Because the output is always in +ve value not the -ve, or please guide me where i am wrong.Thankyou.
  P.S: Iam using Turbo C 3.o compiler.</p>
  
  <pre><code>void subtract (void)
          {
              float f1;
              float f2=0.0;
              float f3=0.0;
              float total;
              printf("Enter numbers to be subtract:'q' to quit.\n ");
              while (scanf("%f",&amp;f1)==1)
                  {
                      f3=f1+f2;
                      total=f3-f1;
                      printf("Enter another # to be subtract:'q' to quit.\n ");
                      scanf("%1.0f",&amp;f1);
                  }
              printf("Subtraction Total = %1.0f",total);
              getch();
          }
  </code></pre>
  
  <p>//I am using now for simple subtraction like 3.6-9.2, i am not getting -5.6 instead I am getting 9 (This for Example)</p>
  
  <h2>I done it what i just want by do the following; Thank you all</h2>
  
  <pre><code>void subtract (void)
              {
                  float f1;
                  float f2;
                  int status1,status2;
                  float total;
  
                  printf("Enter first number to subtract:'n' to quit.\n ");
                  status1=scanf("%f",&amp;f1);
                  printf("Enter second number to be subtract from first:'n' to quit.\n ");
                  status2=scanf("%f",&amp;f2);
                  while (status1==1 &amp;&amp; status2==1)
                      {
  
                          total = f1 - f2;
                          printf("total=%1.2f \n",total);
                          printf("Enter first number to subtract:'n' to quit.\n ");
                          status1=scanf("%f",&amp;f1);
                          printf("Enter second number to be subtract from first:'q' to quit.\n ");
                          status2=scanf("%f",&amp;f2);
                      }
                  printf("Subtraction Total = %1.1f",total);
                  getch();
              }
  </code></pre>