MCPcopy 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'
8void 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
18int main(){
19 cin.tie(0)->sync_with_stdio(0);

Callers 2

fibMethod · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected