fork(2) download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. float findRoot(float a, float b, float epsilon) {
  5. printf("a: %f b: %f epsilon: %f\n", a, b, epsilon); // a: 0.000000 b: 2.312500 epsilon: 0
  6. return b;
  7. }
  8.  
  9. int main() {
  10. float x1, x2, eps;
  11. float res;
  12. x1=1.0;
  13. x2=3.0;
  14. eps=0.1;
  15. res = findRoot(x1, x2, eps);
  16. printf("%f", res); //res: 34.000000
  17. return 0;
  18. }
  19.  
  20.  
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
a: 1.000000 b: 3.000000 epsilon: 0.100000
3.000000