fork(2) download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int d, i;
  5. float a1 = 0;
  6. double a2 = 0;
  7. for (i = 0; i < 10; ++i)
  8. {
  9. a1 += 0.1;
  10. a2 += 0.1;
  11. }
  12. printf("結果:%f\n", a1);
  13.  
  14. if (a1 == 1)
  15. printf("a1==1\n");
  16. else
  17. printf("a1!=1\n");
  18.  
  19. if (a2 == 1)
  20. printf("a2==1\n");
  21. else
  22. printf("a2!=1\n");
  23.  
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
結果:1.000000
a1!=1
a2==1