summary refs log tree commit diff
path: root/tests/pracownia3/016_fib_rec_3.xi
blob: 49a5d5bd3e208a7bce64daad47412ca5d31a92da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fib(x:int):int
{
    if (x == 0) {
        return 0
    }
    if (x == 1) {
        return 1
    }
    return fib(x-1) + fib(x-2)
}

main():int
{
    return fib(5)
}

//@PRACOWNIA
//@out Exit code: 5