view test/fact0.c @ 307:fda28752d301 stdarg-support

stdarg (varargs done... PowerPC, IA32 checked)
author kono
date Wed, 09 Jun 2004 23:01:18 +0900
parents 096559f07a70
children 0c256ea2a97e
line wrap: on
line source

#include "stdio.h"

main(ac,av)
int ac;
char *av[];
{
    printf("%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);
}