aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test_recursive_functions.sh
blob: f9f0ee52f93f5f2b88fce24c7c2c756ddfdb44ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
test_exit_code 89 <<'EOF'
int fib(int n) {
    if (n <= 1) {
        return 1;
    } else {
        return fib(n - 1) + fib(n - 2);
    }
}

int main() {
    return fib(10);
}
EOF