Fibonacci序列递归实现
#include <stdio.h>int Fibonacci(int a){ if (a == 1) return 1; else if (a == 2) return 1; else if (a >= 3) return Fibonacci(a - 1) + Fibonacci(a - 2);}int main(){ printf("Input a POSITIVE INTEGER, I will compute a fibonacci number for you!\n"); int a; scanf("%d", &a); int b = Fibonacci(a); printf("The fibonacci number is: %d\n", b); return 0;}