Skip to main content
4 of 4
Commonmark migration

C,114

Insufficient reputation to comment, but further to Squeamish Offisrage's C answer, 7 byte reduction by using float for double and removing spaces, and combining declaration and init of 'r' gives

float s,c,r=1,x;main(i,n){for(scanf("%f%d",&x,&n);i<n*2;s+=r,r*=-x/i++)c+=r,r*=x/i++;printf("%.8f\n%.8f\n",s,c);}

try here.

tpb261
  • 121
  • 2