C++ / 资源 · 2025年5月17日 28 0

斐波那契数列函数

int fib(int n){
	if(n<=2){
		return 1;
	}
	else{
		return fib(n-1)+fib(n-2);
	}
}

递归求斐波那契第n位