Answers for "write a program in c to display fibonacci series"

C
0

C program to display fibonacci serice

//display fibonacci serice
#include<stdio.h>
#include<conio.h>
int main()
{
    int a=1,b=1,c=0,n;
    printf("\nEnter the limit: ");
    scanf("%d",&n);
    for (int i = 1; i <= 10; i++)
    {
        printf("%d, ",a);
        c= a+b;
        a=b;
        b=c;
    }
    

    return 0;
}
Posted by: Guest on January-30-2022

Code answers related to "write a program in c to display fibonacci series"

Code answers related to "C"

Browse Popular Code Answers by Language