Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #define MAXN 50
- int main()
- {
- int I=0;
- long long int A[MAXN];
- while(I<MAXN)
- {
- if(I>=2)
- {
- A[I]=A[I-2]+A[I-1];
- }
- else
- A[I]=1;
- printf("Sequenza Fibonacci %d: %lld\n\n", I+1, A[I]);
- I++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement