MCPcopy 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>
4int fib(int n){
5 if(n==0 || n==1){
6 return n;
7 }
8 return fib(n-1)+fib(n-2);
9}
10
11int main(int argc, char **argv){
12 assert(argc==2);

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected