view test/fact0.c @ 882:3976dc54ec3d

fix Makefile
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 03 Apr 2014 17:52:05 +0900
parents 5313ed059cee
children
line wrap: on
line source

#include "stdio.h"

main(ac,av)
int ac;
char *av[];
{
    printf("#0006:%d\n",fact(1,1,10 /*atoi(av[1])*/));
    return 0;
}

int
fact(i,j,n) 
/*register*/ int i,j,n;
{
    if (i==n)
        return j;
    return fact(i+1,j*i,n);
}