Preview:
#include <iostream>
using namespace std;

int fib( int n)
{
    if (n<=1)
        return n;
    else 
        return fib(n-1) + fib(n-2);
}


int main() 
{
    cout << fib(9);
    return 0;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter