fork(1) download
  1. #include <stdio.h>
  2.  
  3. int
  4. main(int argc, char* argv[]) {
  5. float f = 1.59;
  6. if (f == 1.59) {
  7. puts("float: equal!");
  8. } else {
  9. puts("float: not equal!");
  10. }
  11.  
  12. double d = 1.59;
  13. if (d == 1.59) {
  14. puts("double: equal!");
  15. } else {
  16. puts("double: not equal!");
  17. }
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
float: not equal!
double: equal!