>
其他
>
一道C语言程序题
e约定于1+1/2!+ 1/3!+.+1/n!
计算前20项;
计算各项,知道小于10^-4为止;
人气:107 ℃ 时间:2020-08-31 04:52:25
解答
请楼主参考,希望有用
#include "stdio.h"
void main(void)
{
double value = 0;
double current = 1;
int i;
for(i=1; i 1e-4; i++)
{
current /= i;
value += current;
}
printf("when it's less than 1e-4, n = %d, value of E is %f\n", i-1, value);
}
推荐
在英语单个名词后面能加s吗?
从1点15分到1点35分 时钟的分针与时针各转过多大角度
已知a>b,比较a2-b与b-b2+ab-1的大小、、
活塞组的组成和活塞环的作用
釜底抽薪 钻木取火 火上浇油 人要实,火要虚
已知:当X=9时,代数式cs+bx+ax-2=10,求x=3时,代数式5-ax-bx-cx的值
Whatdo you think of the school trip?改为同义句
Mary has adog and five fish at home (改成否定句)
猜你喜欢
在密闭容器中加热,加热物质是石蜡,使用电热丝加热,怎么样加热才不会产生新气体?求大神解答.
妈妈做一件上衣用了五分之十二米布,做一条裤子用的布是上衣的六分之五,做一套衣服一共用布多少米?
Permanence may be true,i love this time which fulled with missing.的中文意思
The little girl cried no more and began to smile.(改为同义句)
事实证明,忽视汉语教育不仅造成了生活用词的平庸乏味,也让汉语中独特的文化意蕴在我们的日常生活中日渐消退.
求一个速度转换公式?
to speak seems to be more easily than ________ 填 doing \to do 还是to do
我们应如何保护环境?
© 2024 79432.Com All Rights Reserved.
电脑版
|
手机版