#include<stdio.h>
int fibo(int);
int main()
{
int n, i = 0, c;
printf(" Enter the number of fibonacci : \n");
scanf("%d", &n);
printf("The Fibonacci series terms are as follows:\n ");
for (c = 1; c <= n; c++)
{
printf("%d\n", fibo(i));
i++;
}
return 0;
}
int fibo(int n)
{
if (n == 0 || n == 1)
return n;
else
return (fibo(n-1) + fibo(n-2));
}
OUTPUT :-
Follow
Me On Social Media :-
INSTA photography page :- https://www.instagram.com/photo_mania_hub/
Twitter link : - https://twitter.com/ApurbaKhanra199
Facebook page link (Crazy Coders) :-https://www.facebook.com/codercrazy/?modal=admin_todo_tour
Insta photography link :- https://www.instagram.com/photo_mania_hub/
Facebook link :- https://www.facebook.com/profile.php?id=100009747586288
For tech related videos visit my other website :- https://apurbatechinfo.blogspot.com/
0 Comments