summary refs log tree commit diff
path: root/tests/pracownia3/008_fac_rec_0.xi
blob: 45d5265a9006455fe2ad1ee267a81d2487b64711 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fac(x:int):int
{
    if (x == 0) {
        return 1
    }
    return fac(x-1)*x
}

main():int
{
    return fac(0)
}

//@PRACOWNIA
//@out Exit code: 1