Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/IBM/Project_CodeNet
/ fib
Function
fib
tools/spt-generator/examples/c/fib.c:4–9 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
2
#include <stdlib.h>
3
#include <assert.h>
4
int fib(int n){
5
if(n==0 || n==1){
6
return n;
7
}
8
return fib(n-1)+fib(n-2);
9
}
10
11
int main(int argc, char **argv){
12
assert(argc==2);
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected