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://codercto.com/courses/l/17.html
Head First HTML5 Programming
Eric Freeman、Elisabeth Robson / O'Reilly Media / 2011-10-18 / USD 49.99
What can HTML5 do for you? If you're a web developer looking to use this new version of HTML, you might be wondering how much has really changed. Head First HTML5 Programming introduces the key featur......一起来看看 《Head First HTML5 Programming》 这本书的介绍吧!
CSS 压缩/解压工具
在线压缩/解压 CSS 代码
RGB转16进制工具
RGB HEX 互转工具