斐波纳奇数列:
定义为F0=0,F1=1,......Fn=F(n-1)+F(n-2)
1,1,2,3,5,8,13,21,34,55.......
void FibonacciOdd(int n)
{
int prev_1 = , prev_2 = , item = ;
for(int i=;i<=n;i++)
{
if(i==)
item = ;
else if(i==)
{
item = pre1 = ;
}
else
{
item = prev_1 + prev_2;
pre_2 = pre_1;
pre_1 = item;
}
//cout<<"第"<<i<<"项"<<item<<endl;
}
}