view test/fact0.c @ 67:254a0c576114

argument type list
author kono
date Mon, 24 Feb 2003 00:59:30 +0900
parents fdbf2fbc8140
children 096559f07a70
line wrap: on
line source

#include "stdio.h"

main(ac,av)
int ac;
char *av[];
{
    printf("%d\n",fact(1,1,atoi(av[1])));
}

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