function result = rec_fact(n)

	if (n == 0)
  	  result = 1;
	else
	  result = n*rec_fact(n-1);
	end   