summary refs log tree commit diff
path: root/tests/pracownia3/038_fac_rec_5.xi
blob: 1258e5389f40edc0febb2e79a6e43b8cfa9c2a2e (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(5)
}

//@PRACOWNIA
//@out Exit code: 120