# While torture

if($#==0 || !$isnumber($1))echo Need one numeric parameter
else {
	if($1 < 2){
		echo Factorial of $1 is 1.
		halt
	}
	%tmp = 2
	%fac = 1
	while(%tmp <= $1){
		%fac = %fac * %tmp
		%tmp++;
	}
	echo Factorial of $1 is %fac.
}
