用递归算法算:1, 1, 2, 3, 5, 8, 13 ....第30个是多少

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;
}

posted @ 2010-03-20 18:14  moonlee  阅读(831)  评论(0)    收藏  举报