Java求一道与阶乘有关的题目,

问题描述:

Java求一道与阶乘有关的题目,
计算并输出公式S(N+2)-S(N)大于等于0.0001时,N可取的最小值,其中S(N)=1/2!+1/4!+1/6!+1/8!+.+1/N!

public class Test { static long qiuNdejiecheng(int n) {long temp = 1;for (int j = 2; j0.0001);// 得解 6System.out.println(n - 2); }}public class zhidao{ public static void main(String[]args){int sum=1;double j;for(int N=2;j>=0.0001;N=N+2){ for(int i=2;i