#include<iostream>
using namespace std;
int f(int n)
{
if (n == 1 || n == 2)
return 1;
return f(n - 1) + f(n - 2);
}
int main()
{
int i;
for (i = 0; i < 30; i++)
{
if ((i + 1) % 5 == 0)
cout << endl;
cout << f(i + 1);
cout << " ";
}
return 0;
}
标签:return,cout,递归,产子,int,兔子 From: https://www.cnblogs.com/atrue/p/17337904.html