倒数阶乘之和
时间:2015-10-08 09:08:59
收藏:0
阅读:639
int jh = 10;
double jc = 1;
double sum = 0;
double a = 1;
while(jc <= jh)
{
a = a * jc;
a = 1 / a;
jc++;
sum = sum + a;
}
System.out.println("阶乘和为:"+sum);
原文:http://www.cnblogs.com/zhuxiaolin/p/4860013.html
评论(0)