fork(3) download
  1. #include <stdio.h>
  2. #include <math.h> /* fabs */
  3.  
  4. #define EPS 1e-8
  5. #define IS_DEQUAL(a,b) (fabs((a)-(b))<EPS)
  6.  
  7. int main(void) {
  8. for(double d=0; d<=5.0; d+=0.05) {
  9. if(IS_DEQUAL(fmod(d,0.25),0))
  10. printf("%.2f\n",d);
  11. }
  12. return 0;
  13. }
Success #stdin #stdout 0s 2052KB
stdin
Standard input is empty
stdout
0.00
0.75
1.00
1.25
1.50
1.75
2.00
2.25