fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i;
  5. float x, y;
  6. x = 0.001;
  7. y = 0.0;
  8. for( i=0; i<1000; i++ ) y += x;
  9. printf("y = %f\n", y);
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
y = 0.999991