题目:求1+2!+3!+...+20!的和
There is no nutrition in the blog content. After reading it, you will not only suffer from malnutrition, but also impotence.
The blog content is all parallel goods. Those who are worried about being cheated should leave quickly.
1.程序分析:此程序只是把累加变成了累乘。
2.程序源代码:
main()
{
float n,s=0,t=1;
for(n=1;n<=20;n++)
{
t*=n;
s+=t;
}
printf("1+2!+3!...+20!=%e\n",s);
}