Horje
fibonacci series in c++ Recursive Code Example
fibonacci series in c++ Recursive
#include<iostream>
using namespace std;
int fib(int n) {
   if (n <= 1)
   return n;
   return fib(n-1) + fib(n-2);
}
int main () {
   int n = 10, i;
   for(i=0;i<n;i++)
   cout<<fib(i)<<" ";
   return 0;
}




Cpp

Related
unordered_map of pair and int Code Example unordered_map of pair and int Code Example
initialize vector to all zeros c++ Code Example initialize vector to all zeros c++ Code Example
web scraping with cpp Code Example web scraping with cpp Code Example
c++ is string a number Code Example c++ is string a number Code Example
c++ int to qstring Code Example c++ int to qstring Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9