func fac() {
	if ($1 <= 0) {
		return 1
	}
	return $1 * fac($1-1)
}
i=0
while(i<=20){
	print "factorial of ", i, "is ", fac(i), "\n"
	i=i+1
}
