fork(2) download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. double b=1.8,c=0.2;
  6. if((int)(b/c)==b/c) printf("%.1f / %.1f = %d\n", b, c, (int)(b/c));
  7. else printf("%.1f / %.1f = %.1f\n", b, c, b/c);
  8. return 0;
  9. }
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
1.8 / 0.2 = 9