这里就不要使用数列递归公式了
1 public void Test7() { 2 float fm = 1.0f; 3 float fz = 1.0f; 4 float temp; 5 float sum = 0f; 6 7 for (int i = 0; i < 20; i++) { 8 temp = fm; 9 fm = fz; 10 fz = fz + temp; 11 System.out.println((int) fz + "/" + (int) fm); 12 sum += fz / fm; 13 } 14 System.out.println(sum); 15 }