//Downloaded From theonlinetutorials.com
#include<stdio.h>
int fib(int n)
{
if(n==1)
return 0;
if(n==2)
return 1;
else
return fib(n-2)+fib(n-1);
}
int main()
{
int n,on=0,nn,cou,i;
printf("Enter the no to which you want to print all no which did not occur in fib series");
scanf("%d",&n);
cou=1;
printf("\nNumber which are not occured in the series are\n");
while((nn=fib(cou))<=n)
{
cou++;
for(i=on+1;i<nn;i++)
printf("%d ",i);
on=nn;
}
return 0;
}
Not Satisfied ? Just search & get the result
Related posts:
- Sample – Fibonacci numbers
- C program to find the value of sin(x) using the series up to the given accuracy (without using user defined function) Also print sin(x) using library function.
- C program to find the value of cos(x) using the series up to the given accuracy (without using user defined function) Also print cos(x) using library function.
- C program to generate and print first N FIBONACCI numbers
- C Program To find the fibonacci numbers below a given number.
