fork(2) download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. f(n){return n?n*f(n-1):1;}float c(n,x)float x;{return n?c(n-1,x)+pow(-1,n)*pow(x,2*n)/f(2*n):1;}
  5.  
  6. int main(void)
  7. {
  8. printf("%f", c(0.5, 1));
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
0.875000