Skip to content

Instantly share code, notes, and snippets.

@arn-ob
Created December 31, 2014 09:29
Show Gist options
  • Save arn-ob/c423de36f9eb6ee99746 to your computer and use it in GitHub Desktop.
Save arn-ob/c423de36f9eb6ee99746 to your computer and use it in GitHub Desktop.
Ftbonacei Series ...
#include<stdio.h>
int fib(int n)
{
if(n==0)
return 0;
else if (n==1)
return 1;
else
return fib(n-1)+fib(n-2);
}
void main()
{
int x,y,i;
printf("How many nu number you wanted to see : ");
scanf("%d",&x);
for(i=0;i<=x;i++)
{
y=fib(i);
printf(" %d ",y);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment