/* Factorial function in Risa/Asir */
def fact(N) {
    if (N == 0) {
        return 1;
    } else {
        return N * fact(N - 1);
    }
}

/* Test the factorial function */
for (I = 0; I <= 10; I++) {
    print(I, "! =", fact(I));
}
