请问1+(1/2)-(1/3)+(1/4)-(1/5)+(1/6).-(1/100)1+(1/2)-(1/3)+(1/4)-(1/5)+(1/6)-(1/7)+(1/8)-(1/9)+(1/10)-(1/11)+(1/12)一直到-(1/100)我得出的结果是0.688172,#includeint main(){int sign=1;double deno=2.0,sum=1.0,term;while(deno
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 09:53:32
请问1+(1/2)-(1/3)+(1/4)-(1/5)+(1/6).-(1/100)1+(1/2)-(1/3)+(1/4)-(1/5)+(1/6)-(1/7)+(1/8)-(1/9)+(1/10)-(1/11)+(1/12)一直到-(1/100)我得出的结果是0.688172,#includeint main(){int sign=1;double deno=2.0,sum=1.0,term;while(deno
请问1+(1/2)-(1/3)+(1/4)-(1/5)+(1/6).-(1/100)
1+(1/2)-(1/3)+(1/4)-(1/5)+(1/6)-(1/7)+(1/8)-(1/9)+(1/10)-(1/11)+(1/12)一直到-(1/100)我得出的结果是0.688172,
#include
int main()
{
int sign=1;
double deno=2.0,sum=1.0,term;
while(deno
请问1+(1/2)-(1/3)+(1/4)-(1/5)+(1/6).-(1/100)1+(1/2)-(1/3)+(1/4)-(1/5)+(1/6)-(1/7)+(1/8)-(1/9)+(1/10)-(1/11)+(1/12)一直到-(1/100)我得出的结果是0.688172,#includeint main(){int sign=1;double deno=2.0,sum=1.0,term;while(deno
你这个有一个小小的问题,你把int sign=1;初始话为1了,那么就是1-(1/2)+(1/3)-(1/4)+(1/5).了,应该int sign=-1就对了,结果为1.311828