MCPcopy Create free account
hub / github.com/SR-Sunny-Raj/Hacktoberfest2021-DSA / fabionci

Function fabionci

03. Recursion/Direct Recursion.cpp:6–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4//Progeam to print fibonacci series using "Direct Recursion"
5
6int fabionci(int n)
7{
8 if (n == 0)
9 {
10 return n;
11 }
12 else if (n == 1)
13 {
14 return n;
15 }
16 else
17 return (fabionci(n - 1) + fabionci(n - 2));
18
19}
20
21int main()
22{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected