倒数阶乘之和
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);
浙公网安备 33010602011771号