/* 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) */
#include <stdio.h>

long long int fac(int n)
{
    if(n <= 1)
    {
        return 1;
    }
    else
    {
        return n * fac(n - 1);
    }
}

int main()
{
    int i;
    for(i = 0; i < 15; i++)
    {
        printf("%d %lld\n", i, fac(i));
    }
    return 0;
}
