fork download
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. const int FACTOR = 1000;
  8. int v = 1;
  9. int asum = 0;
  10. for (int i = 0; i < 1000; i++ )
  11. {
  12. asum += v;
  13. }
  14.  
  15. printf("%f", ((float)asum)/FACTOR);
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
1.000000