diff --git a/FibboNaci b/FibboNaci new file mode 100644 index 00000000..74473d1f --- /dev/null +++ b/FibboNaci @@ -0,0 +1,31 @@ +#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<<"Input the number of terms for Fibonacci"; + cin>>n; + cout<<"\nFibonacci Series is as follows\n"; + + while(i