Write a program that evaluate the fibonacci of numbers tells the nth place of the number
NOTE : [I][This question was asked by basiliyos][/I]
Printable View
Write a program that evaluate the fibonacci of numbers tells the nth place of the number
NOTE : [I][This question was asked by basiliyos][/I]
Using the following link fo find the code for fibonacci series....
URL:
[url=http://www.syvum.com/cgi/online/serve.cgi/squizzes/cpp/cpp_p36a.html]C++ Programming : Program 36-A[/url]
--------------------
suresh
Thank you suresh
main()
{
int i=1,m,j=1,n,k;
clrscr();
scanf("%d",&n);
for(m=1;m<=n-2;m++)
{
i=j;
j=k;
k=i+j;
}
printf("%d",k);
getch();
}
At last we have nth value of fibonacci in k.