FIBONACCI SERIES ON GIVEN RANGE

1.  #include<stdio.h>
2.  #include<conio.h>
3.  void main()
4.  {
5.  int n1=1,n2=-1,r,t,i;
6.  clrscr();
7.  printf("\n\tEnter Number ");
8.  scanf("%d",&t);
9.  printf("\n\tFibonacci Series\n\t");
10.     for(i=1;i<=t;i++)
11.     {
12.     r=n1+n2;
13.     printf(" %d",r);
14.     n2=n1;
15.     n1=r;
16.     }
17.     getch();

18.   }
Output

No comments:

Post a Comment

Programmingway@Eklavya Technosys!: JTET 2026 | Computer Sections Solutions | Paper -II

Programmingway@Eklavya Technosys!: JTET 2026 | Computer Sections Solutions | Paper -II :   1) Which of the following is the extension of Not...