Created
December 31, 2014 09:29
-
-
Save arn-ob/c423de36f9eb6ee99746 to your computer and use it in GitHub Desktop.
Ftbonacei Series ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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