Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ fib
Function
fib
CPP/recursion/fib_series.cpp:8–16 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
6
#define mod 1000000007
7
#define endl
'\n'
8
void fib(int arr[],int n){
9
arr[0]=0;
10
arr[1]=1;
11
for (int i = 2; i <= n; ++i)
12
{
13
arr[i]=arr[i-1]+arr[i-2];
14
15
}
16
}
17
18
int main(){
19
cin.tie(0)->sync_with_stdio(0);
Callers
2
fib
Method · 0.85
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected