C 练习实例25
C 语言教程
· 2019-02-21 18:12:04
题目:求1+2!+3!+...+20!的和。
程序分析:此程序只是把累加变成了累乘。
实例
// Created by www.codercto.com on 15/11/9.
// Copyright © 2015年 码农教程. All rights reserved.
//
#include <stdio.h>
int main()
{
int i;
long double sum,mix;
sum=0,mix=1;
for(i=1;i<=20;i++)
{
mix=mix*i;
sum=sum+mix;
}
printf("%Lf\n",sum);
}
以上实例输出结果为:
2561327494111820313.000000
点击查看所有 C 语言教程 文章: https://www.codercto.com/courses/l/17.html
Inside Larry's and Sergey's Brain
Richard Brandt / Portfolio / 17 Sep 2009 / USD 24.95
You’ve used their products. You’ve heard about their skyrocketing wealth and “don’t be evil” business motto. But how much do you really know about Google’s founders, Larry Page and Sergey Brin? Inside......一起来看看 《Inside Larry's and Sergey's Brain》 这本书的介绍吧!