2021-02-17
作者:互联网
#include"stdio.h"
int fib(int n);
void printFN(int m,int n);
int main()
{ int m,n,t;
scanf("%d%d", &m,&n);
printFN(m,n);
return 0;
}int fib(int n)
{ if(n1||n2) return 1; if(n>2) return fib(n-1)+fib(n-2);}void printFN(int m,int n){ int i=0,j,k=1,count=0; for(j=0;j<=21;j++) { i++; if(fib(i)>=m && fib(i)<=n) { count++; printf("%d",fib(i)); } } if(count==0) { printf(“No Fibonacci number”); }}
标签:02,return,17,int,void,fib,2021,printFN 来源: https://blog.csdn.net/weixin_54662410/article/details/113831156