write a program to print the Fibonacci series in c. |Fibonacci series program in c.

Fibonacci series program in c

write a program to print the Fibonacci series in c.

In this program, we will learn how to print the Fibonacci series between 1 to 100 using C language.

#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

Previous articleसी में स्ट्रक्चर क्या है? |स्ट्रक्चर का उपयोग क्यों करें?( structure of c program in hindi)
Next articlePrime Number Program in Java | Write a program to print Prime Number Program in Java.

1 COMMENT

  1. Wonderful article! This is the type of info that is meant to be shared across the
    internet. Disgrace on Google for now not positioning this submit upper!

LEAVE A REPLY

Please enter your comment!
Please enter your name here