初学~献丑了
#include <iostream.h>
int tuzi(int x);
int main()
{
int N;
cout<<"please putin N=";
cin>>N;
cout<<"after "<<N<<" years:"<<tuzi(N)<<endl;
return 0;
}
int tuzi(int x)
{
if(x==0||x==1||x==2||x==3)
return 1;
return(tuzi(x-1)+tuzi(x-4));
}
//f(n)=f(n-1)+f(n-4)