Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fibonacchi
- //Mir Shamim Nahid
- #include <stdio.h>
- int main ()
- {
- int f[100];
- int n,i;
- printf("Enter Number of input:");
- scanf("%d",&n);
- f[0]=0;
- f[1]=1;
- for(i=2; i<n; i++)
- {
- f[i]=f[i-1]+f[i-2];
- }
- for(i=0;i<n;i++)
- {
- printf("%d ",f[i]);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement