聂宁的回答:
private static int count=1; public int digui(int a,int b){ int c=a+b; count++; if(count <= 30){ digui(b,c); } return c; }
杨近川的回答:
private static int count=1; public int digui(int a,int b){ int c=a+b; count++; if(count <= 30){ digui(b,c); } return c; }
许伟的回答:
public static int Add(int i) { if(i<=0) return="" else="" i="">0 && i<=2) { return 1; } else { return Add(i-1)+Add(i-2); } }
王思远的回答:
f(x)=f(x-1)+f(x-2) 设f(0)=1 设f(1)=1 然后就好了 int f(x) { if(x==0||x==1)return 1; else return f(x-1)+f(x-2); } 没调试过^^
言艺的回答: