Skip to content

Commit 0a62110

Browse files
authored
Create aishik.cpp
1 parent 0abf243 commit 0a62110

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

aishik.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//Fibonacci Series using Recursion
2+
#include<bits/stdc++.h>
3+
using namespace std;
4+
5+
int fib(int n)
6+
{
7+
if (n <= 1)
8+
return n;
9+
return fib(n-1) + fib(n-2);
10+
}
11+
12+
int main ()
13+
{
14+
int n = 9;
15+
cout << fib(n);
16+
getchar();
17+
return 0;
18+
}

0 commit comments

Comments
 (0)