#include<iostream>
using namespace std;
#define MONTH 5
int Feibo(int month)
{
int total = 1;
if(month>=3)
total = Feibo(month-1)+Feibo(month-2);
return total;
}
void main()
{
int total = 0;
total = Feibo(MONTH);
cout<<"total is: "<<total<<endl;
}
兔子生兔子问题
最新推荐文章于 2024-01-03 21:00:00 发布