Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i, n, F1 = 0, F2 = 1, Fn;
- printf("Enter the number of terms: ");
- scanf("%d", &n);
- printf("Fibonacci Series: ");
- for (i = 1; i <= n; ++i)
- {
- printf("%d ", F1);
- Fn= F1 + F2;
- F1 = F2;
- F2 = Fn;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement