The following is the code to generate the fibonacci number at a user specified position using recursive function.
Code:
==================================================
#include
long fiboo(int y);
void main()
{
int x;
cout<
cin>>x;
cout<
}
long fiboo(int y)
{
if (n <= 1) {
return n;
} else {
return fiboo(n-1)+fiboo(n-2);
}
}
==============================================
ok thats it
if you want any help feel free to contact me
at http//www.blaisemcrowly.co.cc USE THE CONTACT ME PAGE
or mail me at blaise.crowly@gmail.com
Code:
==================================================
#include
long fiboo(int y);
void main()
{
int x;
cout<
cin>>x;
cout<
}
long fiboo(int y)
{
if (n <= 1) {
return n;
} else {
return fiboo(n-1)+fiboo(n-2);
}
}
==============================================
ok thats it
if you want any help feel free to contact me
at http//www.blaisemcrowly.co.cc USE THE CONTACT ME PAGE
or mail me at blaise.crowly@gmail.com
No comments:
Post a Comment