Fibonacci Numbers are the numbers in series which follow the concept that every next number is the sum of previous two numbers. But then which were the first two numbers. They are initially taken 0,1 . Series:

0,1,1,2,3,5,8,13,21,34,55,89…..

**Also See: c program to print first 20 fibonacci numbers**

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
class prog11 { void main() { int a=,b=1,c,count=2; System.out.print(a+","); System.out.print(b+","); while(count!=20) // if you want first 100 fibonacci numbers then change 20 to 100 accordingly { c=a+b; count++; System.out.print(c+","); a=b; b=c; } } } |

** OUTPUT: **