#include <iostream>
using namespace std;
int fibonacci(int);
int main()
{
for(int number=0; number<=10; number++)
cout << fibonacci(number)<< " ";
return 0;
}
int fibonacci(int number)
{
if(number<=1)
{
return number;
}
else
return fibonacci(number-1) + fibonacci(number-2);
}
Thursday, 24 January 2013
fibonacci series
08:21
ATEEK
No comments
0 comments:
Post a Comment