/*
 * This is a simple factorial program, to test the execution of a recursive
 * function.  The result should be a value of 24 in location 0.
 */

int x;

void main() {
    x = fact(4);
}

int fact(int x) {
    if (x > 0) {
	return x * fact(x - 1);
    }
    else {
        return 1;
    }
}