斐波那契数:1 1 2 3 5 8 13 21 34 .....
题1:使用递归完成求斐波那契额数列第n项的值
#includeint feibonaqie(int n){ if(1 == n || 2 == n) { return 1; } else { return feibonaqie(n-1) + feibonaqie(n-2); }}int main(int argc, const char *argv[]){ int a = 0; scanf("%d",&a); int b = feibonaqie(a); printf("%d\n",b); return 0;}复制代码