Write a program to generate the Fibinocci Series

Showing Answers 1 - 3 of 3 Answers

#include<stdio.h>
#include<conio.h>
int main()
{
        int f1=0, f2=1,i, n, k;
    printf("enter the value of n n");
    scanf("%d", &n);
    for(i=0;i<=n;i++)
    {
                   k=f1+f2;
                   printf("%dn",k);
                   f1=f2;
                   f2=k;
     }
     getch();
}

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions