diff --git a/Fibonacci/dynamic_fibonacci_series.cpp b/Fibonacci/dynamic_fibonacci_series.cpp new file mode 100644 index 0000000..3c9f9bb --- /dev/null +++ b/Fibonacci/dynamic_fibonacci_series.cpp @@ -0,0 +1,25 @@ +#include +using namespace std; +int fibonacci(int n) +{ + if ((n==1)||(n==0)) + { + return n; + } + else + { + return (fibonacci(n-1)+fibonacci(n-2)); + } +} +int main() +{ + int n,i=0; + cout<<"\n input the no. of terms for fibonacci series"; + cin>>n; + while(i