Write a program to print first.
10 terms of fibonacci series
using for loop.
write step by step program please
Answers
Answered by
2
Explanation:
int f(int);
int main() { int n, i = 0, c;
scanf("%d", &n);
printf("Fibonacci series terms are:\n");
for (c = 1; c <= n; c++) { printf("%d\n", f(i)); i++; }
return 0; }
int f(int n) { if (n == 0 || n == 1) return n; else. return (f(n-1) + f(n-2)); }
Similar questions
English,
3 months ago
India Languages,
3 months ago
India Languages,
3 months ago
Math,
6 months ago
Science,
6 months ago
Political Science,
10 months ago
Physics,
10 months ago