1:59 PM
C++ Program to calculate FIBONACCI SERIES
Write a Program to calculate the FIBONACCI SERIES
 
#include<iostream.h> 
#include<conio.h> 
 
void main()
{
int i=0,j=1,k=2,r,f;
clrscr();
printf("Enter the number range:");
scanf("%d",&r);
printf("\nFIBONACCI SERIES: ");
printf("%d %d",i,j);
while(k<r)
{
f=i+j;
i=j;
j=f;
printf(" %d",j);
k++;
}
getch();
}
 
Note:
       If you want to change in this program please write through the comment on this page. you can also past similar program of 
             c++ with output.your comment is valuable to the other user and person.
Views: 96 | Added by: vijoriya | Tags: calculate, program, c++, Fibonacci series | Rating: 0.0/0
Total comments: 0
avatar