Introduction:
  • In this article i'm going to explain " how to find the fibonacci series"
Software Requirements:
  • Turbo C++ OR C
Programming:
  1. #include<stdio.h>
  2. void main()
  3. {
  4. int a,b,c,i,n;
  5. a=0;
  6. b=1;
  7. printf("Enter a no to define length of the series:");
  8. scanf("%d",&n);
  9. printf("\n The series is:\n");
  10. printf("%d\t%d",a,b);
  11. for (i=0;i<n;i++)
  12. {
  13. c=a+b;
  14. a=b;
  15. b=c;
  16. printf("\t%d",c);
  17. }
  18. getch();
  19. }
Explanation:
  • In the above programming, i have explained about the fibonacci series is defined by length of fibonacci sequence in an cleared manner.
Output: