fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. double dOutput = 0;
  7. for (int x = 0; x < 10; x++) {
  8. dOutput += 0.1;
  9. printf("%f\n", dOutput);
  10. printf("%1.16f\n\n", dOutput);
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
0.100000
0.1000000000000000

0.200000
0.2000000000000000

0.300000
0.3000000000000000

0.400000
0.4000000000000000

0.500000
0.5000000000000000

0.600000
0.6000000000000000

0.700000
0.7000000000000000

0.800000
0.7999999999999999

0.900000
0.8999999999999999

1.000000
0.9999999999999999