Sunday, July 31, 2016

Fibonacci Series using while loop in C Programming

/*
#include<stdio.h>
#include<conio.h>
void main()
{
    int a=2, b=2, c, i=1;
    printf("\n %d ",a);
    printf("%d ",b);
    while(i<=10)
    {
        c=a+b;
        printf("%d ",c);
        a=b;
        b=c;
        i++;
    }
    getch();
}
Fibonacci Series using while loop */

0 comments:

Post a Comment