// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class Fac {
    public static long fac(int n) {
        if(n <= 1) {
            return 1;
        } else {
            return n * fac(n - 1);
        }
    }
    public static void main(String[] args) {
        for(int i = 0; i < 15; i++) {
            System.out.printf("%d %d\n", i, fac(i));
        }
    }
}
