1.fibonacci数列:

递归:

1 int fib(int n){
2     if(n<=1)    return 1;
3     return fib(n-1)+fib(n-2);
4 }
View Code

相关文章: