Asked by
AL MaMun (4 Golds)
Friday, 31 Jul 2020, 04:18 PM
at (Education
Tutorials)
|
|
|
|
C program to print fibonacci number series. #include<stdio.h> int main() { int a=0, b=1, c, i, n, result; printf("How many fibonacci number do u need? "); scanf("%d", &n); for(i=0; i<n; i++) { if(i<=1) c=i; else { c=a+b; a=b; b=c; } printf("%d ", c); } return 0; } |