Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  fibonacci
Language: C/C++
Code:
#include "stdio.h"
#include "conio.h"
void main()
{
 int a,b,c,i,n;
 clrscr();
 a=0;
 b=1;
 printf("n enter n for how many times generate series");
 scanf("%d",&n);
 printf("n FIBONACCI SERIESn");
 printf("t%dt%d",a,b);
for(i=0;i<n;i++)
{
     c=a+b;
     a=b;
     b=c;
     printf("t%d",c);
 }
 getch();
}
          
Comments: