Code for febonacci series

Code for febonacci series

#include<stdio.h>
#include<conio.h>
void main()
{
    int i,a=0,b=1,f;
    printf("%d%d",a,b);
    for(i=1;i<=8;i++)
    {
        f=a+b;
        a=b;
        b=f;
        printf("%d",f);
    }

    getch();
}

Output



Comments

Popular posts from this blog

Code for pattern 6

Code to check leap year