fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. double x = 0.0;
  5. for (int i = 0; i < 10; i++)
  6. x += 0.1;
  7. printf(x == 1.0 ? "Equal\n" : "Not equal\n");
  8. printf("%.20lf", x);
  9. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Not equal
0.99999999999999988898