Program to print Fibonacci series up to 100.

इस प्रोग्राम में हम यह सीखेंगे कि किस तरह C लैंग्वेज का उपयोग करके 1 से 100 के बीच कि फिबोनाक्की सीरीज प्रिंट कर सकते है|

#include<stdio.h>
#include<conio.h>
void main()
{
  int a=1,b=1,c=0,i;
  clrscr();
  printf("%d\t%d\t",a,b);
  for(i=0;i<=10;i++)
  {
    c=a+b;
    if(c<100)
    {
      printf("%d\t",c);
    }
    a=b;
    b=c;
  }
  getch();
}

Output:
1 1 2 3 5 8 13 21 34 55 89


error: Content is protected !!