fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. double a = 1.2;
  5. double b = 1.0;
  6. double c = 0.2;
  7.  
  8. a - b == c ? printf("true") : printf("false");
  9. printf("\n");
  10. a * 10 - b * 10 == c * 10 ? printf("true") : printf("false");
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
false
true