时间:2021-02-18 11:19:57 | 栏目:C代码 | 点击:次
int Feibo(int Num)
{
if(Num == 1 || Num == 2)
{
return 1;
}
else
{
return Feibo(Num - 1) + Feibo(Num - 2);
}
}
void main()
{
int NumIn,i;
scanf("%d", &NumIn);
for(i=1;i<NumIn;i++)
{
printf("%d ",Feibo(i));
}
printf("%d",Feibo(NumIn));
}