Fibonacci Series:
- Fibonacci Series is the Series in which Next Number is Sum of Previous Two Numbers.
- Example: 0 1 1 2 3 5 8 13 21 34 ............and so on.
#include<stdio.h>
#include<conio.h>
int a,b,c;
clrscr();
clrscr();
a=0;
b=1;
while(a<=100)
{
printf("\n%d" ,a);
c=a+b;
a=b;
b=c;
}
getch();
}
Output:
0
1
1
2
3
5
8
13
21
0 Response to "Write a C Program For Fibonacci Series upto 100 by using while Statement"
Post a Comment