Click here to Skip to main content
13,141,576 members (55,246 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

3.2K views
2 bookmarked
Posted 14 Sep 2010

Fibonacci Recursive and Non Recursive C++

, 14 Sep 2010
Rate this:
Please Sign up or sign in to vote.
A stupid change :) int FibonacciR::Fibonacci(const int &n){ if(n<=1) return n; return Fibonacci(n-1) + Fibonacci(n-2); } :laugh:
A stupid change :)
int FibonacciR::Fibonacci(const int &n){
if(n<=1)
    return n;
return Fibonacci(n-1) + Fibonacci(n-2);
}

:laugh:

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

ostream
Afghanistan Afghanistan
This member doesn't quite have enough reputation to be able to display their biography and homepage.

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170915.1 | Last Updated 14 Sep 2010
Article Copyright 2010 by ostream
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid