t*=i,(t/=(i+i+1.0))/=(i+i),sum+=t; 中间的那两个逗号应该是分号吗?
追答你要改成分号的话,就得把t*=i,(t/=(i+i+1.0))/=(i+i),sum+=t;用{}括起来!
...的某一项的值小于0.000001为止。通项公式是n!\/(2n+1)!
include <stdio.h>int main(void){ double sum,t; int i; for(sum=0,t=i=1;t>=1.0E-6;i++) t*=i,(t\/=(i+i+1.0))\/=(i+i),sum+=t; printf("The result is %g\\n",t); return 0;}
c语言编程求下面式子的和,直到加上去的某一项的值小于0.000001...
} printf("number=%d,sum=%0.5f\\n",i,sum);return 0;}
...以下式子,直到某一项的绝对值小于 0.000001为止?
printf("最后一项n=%d",i-1);return 0;}