http://pta.patest.cn/pta/test/13/exam/3/question/477
#include <stdio.h>
int fib( int n );
void PrintFN( int m, int n );
int main()
{
int m, n, t;
scanf("%d %d %d", &m, &n, &t);
printf("fib(%d) = %d\n", t, fib(t));
PrintFN(m, n);
return 0;
}
int fib( int n )
{
if(n==1||n==2)
{
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");
}
}