fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. float f=0.0f;
  5. int i;
  6.  
  7. for(i=0;i<10;i++)
  8. {
  9. f = f + 0.1f;
  10. }
  11.  
  12.  
  13. if(f>0.99f && f<1.01f)
  14. printf("f is 1.0 \n");
  15.  
  16. else
  17. printf("f %f is NOT 1.0\n",f);
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 2052KB
stdin
Standard input is empty
stdout
f is 1.0