OpenCores
URL https://opencores.org/ocsvn/mblite/mblite/trunk

Subversion Repositories mblite

[/] [mblite/] [trunk/] [sw/] [fibonacci/] [testbench.c] - Rev 10

Go to most recent revision | Compare with Previous | Blame | View Log

int fib(int n){
    switch (n) {
        case 0:
            return 0;
        case 1:
            return 1;
        default:
            return fib(n-1) + fib(n-2);
    }
}
 
int main()
{
    fib(15);
    return 0;
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.