Program to display
fibonacci series upto n terms
0, 1, 1, 2, 3, 5, 8 .... n terms
for example: display fibonacci series till 5 terms
0,1 ,1,2,3.....
Answers
Answered by
0
Answer:
12 is the correct answer
Answered by
0
Answer:
#include<stdio.h>
int main()
{
int i=1,n,a,b=0,c=1;
printf("Enter value of N");
scanf("%d",&n);
while(i<=n)
{
a=b;
b=c;
c=a+b;
printf("%d\n",a);
i++;
}
return 0;
}
Explanation:
SEE THIS IS OF C PROGRAM .
IT WILL START FROM 0 AND WILL GO TILL n .
I HOPE IT HELPS YOU.
Similar questions