文章标题
2017-05-27 19:56
281 查看
package fangzao.www;
public class test{
public static void main(String[] args) {
test e = new test();
// System.out.println();
System.out.println(“结果是”+e.Test(5));
}
public class test{
public static void main(String[] args) {
test e = new test();
// System.out.println();
System.out.println(“结果是”+e.Test(5));
}
public double Test(double index) { if (index == 1) { return 1; } if (index == 2) { return 1; } //double namber=Test(index-1) + Test(index - 2); System.out.println(index); return Test(index-1) + Test(index - 2); } }